jest-cucumber
jest-cucumber copied to clipboard
Integration tests
While the examples are useful as E2E tests, they alone don't provide adequate test coverage, so integration tests are needed. Most of the logic in Jest Cucumber can be integration tested by eliminating Jest and dependency injecting a mock test runner. The following has been done so far as part of this effort:
- Added ability to dependency inject either Jest, a mock test runner, or another test runner like Mocha
- Implemented a mock test runner
- Created a specs directory with feature files and step definitions. Feature file with rules / scenarios are in place to cover almost all of the library, but steps for many scenarios are still missing in the feature files, and step definition code for many of the scenarios are still a WIP
- Introduced GitHub actions to run the tests on every commit and on PRs
Feature file automation progress
- [ ] docstring-step-arguments
- [x] step-execution
- [x] step-matching
- [x] table-step-arguments
- [ ] auto-bind-steps
- [ ] backgrounds
- [ ] defining-rules-and-scenarios
- [ ] scenario-outlines
- [ ] spoken-languages
- [ ] tag-filtering
- [x] validation-and-code-generation
I'm using latest jest-cucumber from master branch and can confirm I'm able to inject Vitest using createDefineFeature!
@thelinuxlich Could you share the steps you took for this? 🙏🏻
@halvardssm sure, look at this repo, I've created an example demonstrating it: https://github.com/thelinuxlich/svelte-atdd-vitest-playwright
Hello @bencompton,
Would it be possible to take stock of the situation quickly? To find out what still needs to be done, unless you confirm that it is already up to date.
You could also pin this issue and add a 'work-in-progress' label, so that each contributor can see what remains to be done, and indicate here what they are working on to improve the test coverage.
@pplancq - I'm planning to work on this incrementally over the next several days until test coverage is where it needs to be. This can happen in parallel with other work, though.
@bencompton didn't hesitate to put the work-in-progress label to prevent the stale workflow from closing this exit.
@bencompton any news here, maybe a PR to rely on.
I checked the code that was supposed to be found on master but now we have main branch and the signature of createDefineFeature does not seem to allow injecting anything in there.