Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davorbadrov/testing-playground
A simple Jest environment for playing with tests
https://github.com/davorbadrov/testing-playground
jest nodejs unit-testing
Last synced: 20 days ago
JSON representation
A simple Jest environment for playing with tests
- Host: GitHub
- URL: https://github.com/davorbadrov/testing-playground
- Owner: davorbadrov
- License: mit
- Created: 2018-10-07T11:08:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-07T11:14:48.000Z (about 6 years ago)
- Last Synced: 2024-10-17T13:13:59.548Z (2 months ago)
- Topics: jest, nodejs, unit-testing
- Language: JavaScript
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Testing boilerplate
Boilerplate code used for trying out things, working on CodeWars asignments, etc.
## Usage
Just duplicate the `task_template` dir and fill out your `task.js` and `task.test.js`.
To run the test once use `npm run test`
To run the tests continously after each change run `npm run test:watch`## VS Code integration
If you're using VS Code you have 2 Debug commands, borrowed from [VS Code recipes](https://github.com/Microsoft/vscode-recipes/tree/master/debugging-jest-tests).
**Run all the tests** by running the `Jest All` command.
This will run all the tests and you can add breakpoints in VS Code for easier debugging.**Run a single test** by running the `Jest Current File`. This will run only the test file which is active when you run the command, if a test file isn't selected it won't work properly.