Create integration tests with Jest caching enabled
See original GitHub issueThis issue is for tracking of implementation of tests for issue #30. I’m not sure that I’ll be able to complete this task soon, but definitely will try to find a way. Some thoughts:
- Create folder like
watch-test
; - Create helper like
runJestInWatch.ts
based onrunJest.ts
with--watch
or--watchAll
enabled; - This helper have to do next things:
3a. Run tests inwatch-test
and collect results*;
3b. Change test file inwatch-test
and collect results*;
3c. Change source file inwatch-test
and collect results*;
3d. Change config file inwatch-test
and collect results*;
3e. Terminate process; - Create
watch.spec.ts
that runs this helpers and checks results for correctness.
* I’m not sure that we’ll be able to collect correct results before process termination, so this part could be moved to last step of helper.
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (18 by maintainers)
Top Results From Across the Web
Configuring Jest
Make sure it is installed in your project. The configuration also can be stored in a JSON file as a plain object: jest.config.json....
Read more >Integration testing - Apollo GraphQL Docs
There are two main options for integration testing with Apollo Server: ... example of setting up a test using the JavaScript testing library...
Read more >enabling jest cache in CI servers
As I understand Jest test execution gets faster when we run along with the cache build over the previous runs. In out project...
Read more >A Node.js Guide to Actually Doing Integration Tests
Therefore, testing isn't complete until you've completed both integration and unit tests. Set up the Suite for Integration Tests. While setting up a...
Read more >Spring Cache and Integration Testing
Evict Caches Manually ... In order to get full control over testing your application with caching, I recommend using a single integration test...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@satazor, and it probably has some issues with running on *nix, cause build weren’t failed when I’ve used default
spawn
. But I think it should be implemented in your package, so we can try to make a PR that implements it and use fallback to defaultkill()
implementation on *nix system. Probably @kentcdodds can help, and I guess we have to continue this discussion in your repo.Solved by https://github.com/kulshekhar/ts-jest/commit/42a75c50dfe694d3d42b43beaede348b24cf6b97, so we only have to improve test cases.