Closed dmvianna closed 9 years ago
I am trying to test both server and client code. So the obvious directory structure would be:
./myApp ├── api ├── assets ├── ... ├── test │ ├── server │ │ ├── unit │ │ │ ├── controllers │ │ │ │ └── UsersController.test.js │ │ │ ├── models │ │ │ │ └── Users.test.js │ │ │ └── ... │ │ ├── fixtures │ │ ├── ... │ │ ├── bootstrap.test.js │ │ └── mocha.opts │ └── client │ ├── unit │ ├── ... │ ├── karma.conf.js │ ├── test.main.js │ └── mocha.opts └── views
Is it currently possible? Barrels seems to want fixtures to be in ./myApp/test/fixtures, and there is no documentation about how to change that.
./myApp/test/fixtures
EDIT: Not a big issue, as leaving the fixtures directory where it is expected to be and using
"test": "NODE_ENV=test mocha test/server -R spec -b --recursive"
in package.json is enough to run npm test successfully, at least for the server tests. It is just that I prefer to put things where they belong.
package.json
npm test
https://github.com/bredikhin/barrels/blob/master/index.js#L20
I am trying to test both server and client code. So the obvious directory structure would be:
Is it currently possible? Barrels seems to want fixtures to be in
./myApp/test/fixtures
, and there is no documentation about how to change that.EDIT: Not a big issue, as leaving the fixtures directory where it is expected to be and using
in
package.json
is enough to runnpm test
successfully, at least for the server tests. It is just that I prefer to put things where they belong.