mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
remove artificial memory limit, npm test is just mocha now
This commit is contained in:
parent
bdd13e6449
commit
5729a7efd9
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
@ -45,7 +45,7 @@ npm run test-coverage
|
||||
While developing you can run a single test group and use [grep](https://mochajs.org/#-g---grep-pattern) to filter the tests:
|
||||
|
||||
```
|
||||
npm run mocha -- --grep=lifecycle
|
||||
npm test -- --grep=lifecycle
|
||||
```
|
||||
|
||||
### Adding tests
|
||||
@ -89,7 +89,7 @@ Expected failures won't cause [Travis CI](https://travis-ci.org/marko-js/marko)
|
||||
If you need to dig a bit deeper into a failing test, use the `--inspect-brk` flag, open Chrome DevTools, and click on the green nodejs icon (<img height="16" src="https://user-images.githubusercontent.com/1958812/37050480-d53e4276-2128-11e8-8c7a-f5d842956c98.png"/>) to start debugging. Learn more about [debugging node](https://www.youtube.com/watch?v=Xb_0awoShR8&t=103s) from this video.
|
||||
|
||||
```
|
||||
npm run mocha -- --grep=test-name --inspect-brk
|
||||
npm test -- --grep=test-name --inspect-brk
|
||||
```
|
||||
|
||||
In addition to [setting breakpoints](https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints), you can also add [`debugger;`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger) statements in both your JavaScript files and Marko templates:
|
||||
@ -106,7 +106,7 @@ A number of the test suites make use snapshot comparisons. For example, the `ren
|
||||
To update a snapshot, you can copy the contents from the `actual` file to the `expected` file in the fixture directory. You can also use the `UPDATE_EXPECTATIONS` env variable to cause the test runner to update the `expected` file for all currently failing tests in a suite:
|
||||
|
||||
```
|
||||
UPDATE_EXPECTATIONS=1 npm run mocha
|
||||
UPDATE_EXPECTATIONS=1 npm test
|
||||
```
|
||||
|
||||
## Tackling an existing issue
|
||||
|
||||
@ -8,9 +8,8 @@
|
||||
"build-src": "node scripts/build.js src",
|
||||
"prepublish": "npm run build-src",
|
||||
"precommit": "lint-staged",
|
||||
"test": "npm run lint -s && npm run mocha -s",
|
||||
"test-ci": "npm run check-format && npm run test-generate-coverage",
|
||||
"mocha": "mocha --timeout 10000 --max-old-space-size=768 ./test/*/*.test.js",
|
||||
"test": "mocha --timeout 10000 ./test/*/*.test.js",
|
||||
"test-ci": "npm run lint && npm run check-format && npm run test-generate-coverage",
|
||||
"test-coverage": "npm run test-generate-coverage && nyc report --reporter=html && opn ./coverage/index.html",
|
||||
"test-generate-coverage": "nyc -asc npm test",
|
||||
"lint": "eslint .",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user