remove artificial memory limit, npm test is just mocha now

This commit is contained in:
Michael Rawlings 2018-06-28 10:13:32 -07:00
parent bdd13e6449
commit 5729a7efd9
No known key found for this signature in database
GPG Key ID: 95A877250FE4F1FA
2 changed files with 5 additions and 6 deletions

View File

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

View File

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