Skip to content
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

Integration tests #148

Open
4 of 11 tasks
bencompton opened this issue Jan 21, 2022 · 7 comments
Open
4 of 11 tasks

Integration tests #148

bencompton opened this issue Jan 21, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@bencompton
Copy link
Owner

bencompton commented Jan 21, 2022

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
  • step-execution
  • step-matching
  • table-step-arguments
  • auto-bind-steps
  • backgrounds
  • defining-rules-and-scenarios
  • scenario-outlines
  • spoken-languages
  • tag-filtering
  • validation-and-code-generation
@thelinuxlich
Copy link

I'm using latest jest-cucumber from master branch and can confirm I'm able to inject Vitest using createDefineFeature!

@halvardssm
Copy link

@thelinuxlich Could you share the steps you took for this? 🙏🏻

@thelinuxlich
Copy link

@halvardssm sure, look at this repo, I've created an example demonstrating it: https://github.com/thelinuxlich/svelte-atdd-vitest-playwright

@pplancq
Copy link
Contributor

pplancq commented Mar 26, 2024

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.

@bencompton
Copy link
Owner Author

@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.

@pplancq
Copy link
Contributor

pplancq commented Apr 4, 2024

@bencompton didn't hesitate to put the work-in-progress label to prevent the stale workflow from closing this exit.

@bencompton bencompton added the enhancement New feature or request label Apr 4, 2024
@kornicameister
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants