trailsjs / generator-trails-old

:package: Trails Generator.
Other
6 stars 8 forks source link

Generated package.json test script doesn't run tests. #70

Closed wbprice closed 7 years ago

wbprice commented 7 years ago

In a freshly scaffolded Trails app with one generated model, the model tests aren't seen by mocha when the developer runs npm test.

  // package.json
  . . .
  "scripts": {
    "test": "eslint . && mocha"
  },
  . . .

Could be fixed by adding test --recursive to the test script or by adding a mocha configuration file.

  // package.json
  . . .
  "scripts": {
    "test": "eslint . && mocha test --recursive"
  },
  . . .
wbprice commented 7 years ago

@tjwebb do you have any strong opinions about adding flags to the script vs. adding a default configuration file?

wbprice commented 7 years ago

Updated my generator and reran. Mocha options file is being generated, so it should work.