-
Notifications
You must be signed in to change notification settings - Fork 5k
feat(test runner): allow running test.spec.md files #38758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Skn0tt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, left some ideas in the comments.
| const match = propText.match(/^([^:]+):(.*)$/); | ||
| if (!match) | ||
| throw new Error(`while parsing ${filename}: describe property must be in format "key: value"`); | ||
| props.set(match[1].trim(), match[2].trim()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's support some more props:
### Adding Todos
- seed: ./seed.spec.md
- annotation: prd=https://jira.com/PR123
- tag: @test
- slow
- timeout: 3000
#### should add single todo
- Add the todo
- Type 'Buy groceries' into the input field
- expect: The text appears in the input field
- Press Enter to submit the todo
- Verify todo is added to the list
- expect: The new todo 'Buy groceries' appears in the todo list
- expect: The input field is cleared
- expect: The todo counter shows '1 item left'
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| for (const test of parsed.tests) | ||
| test.lines = parsedSeed.tests[0].lines.concat(test.lines); | ||
| const fixtures = parsedSeed.props.find(prop => prop[0] === 'fixtures'); | ||
| if (fixtures && !parsed.props.find(prop => prop[0] === 'fixtures')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if seed and test both specify different fixtures, we should throw an error
Test results for "tests 1"8 failed 7 flaky34442 passed, 696 skipped Merge workflow run. |
Test results for "MCP"2822 passed, 116 skipped Merge workflow run. |
No description provided.