mercredi 13 janvier 2021

Package json how to test multiple test files

I have test.js and test2.js in the same folder "test"

Before I have in package.json:

  "name": "test",
  "version": "1.0.0",
  "main": "test.js",
  "scripts": {
    "test": "mocha test.js"
  },
  "author": "",
  "license": "ISC",
  "description": ""
}

and npm test will run test.js

How do I make it so that in terminal

npm test will run test.js and npm test2 will run test2.js?

Aucun commentaire:

Enregistrer un commentaire