Editing Test Scripts in package.json
- 05 Dec 2022
-
DarkLight
-
PDF
Editing Test Scripts in package.json
- Updated on 05 Dec 2022
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
You can edit the scripts in the package.json to change the log level for testing.
- The adapter logs the options for the HTTP request as well as the response it receives in debug mode. Hence, when errors occur, it is preferfable to run the tests in debug mode.
- The adapter logs every step it takes in trace mode. Often, these logs are too frequent to be useful, and should only be used to isolate what part of the adapter is having issues.
Example: Edited Script
"scripts": {
..
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
"test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
"test": "npm run test:unit && npm run test:integration",
..
},
Was this article helpful?