Closed benhutchins closed 9 years ago
I tested using peerDependencies
, however this will only work if a project includes both grunt-js-test
and chai
itself. That would probably be ideal, but will require Chai and Sinon to not be expected by default.
Chai is still required by all the example projects, should probably rewrite those to just use Mocha's built in assert libraries and then make Chai optional. It'd be best if the deps
option for the js-test
grunt task could someone also be used to include Chai, Sinon or other similar libraries.
Use Mocha, Sinon and Chai as npm modules instead of including them in
views/deps
This was partially done in PR https://github.com/vistaprint/grunt-js-test/pull/15 however Mocha was still using
views/deps/mocha.css
and didn't work ifmocha
was installed globally vianpm install -g mocha
which may be done if someone wanted to use themocha
CLI.Using
require.resolve
to create a static file handler for each (Mocha, Chai and Sinon). Then include them through that from the jade templates. Also have new options to explicitly disable Chai or Sinon, although currently Chai will cause some warnings if excluded because it's expected byviews/deps/shared.js
.Also partially tackles #2