Editing Test Scripts in package.json
  • 05 Dec 2022
  • Dark
    Light
  • PDF

Editing Test Scripts in package.json

  • Dark
    Light
  • PDF

Article Summary

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?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.