diff --git a/test/fixtures/errors/app.coffee b/test/fixtures/errors/app.coffee new file mode 100644 index 0000000..b4d9e83 --- /dev/null +++ b/test/fixtures/errors/app.coffee @@ -0,0 +1,5 @@ +Browserify = require '../../..' + +module.exports = + ignores: ["**/_*", "**/.DS_Store"] + extensions: [Browserify(files: "index.js")] diff --git a/test/fixtures/errors/doge.js b/test/fixtures/errors/doge.js new file mode 100644 index 0000000..5737e33 --- /dev/null +++ b/test/fixtures/errors/doge.js @@ -0,0 +1 @@ +module.exports = 'wow' diff --git a/test/fixtures/errors/index.js b/test/fixtures/errors/index.js new file mode 100644 index 0000000..09360ef --- /dev/null +++ b/test/fixtures/errors/index.js @@ -0,0 +1,2 @@ +var doge = require('./doge'); +console.log(doge); diff --git a/test/fixtures/errors/not_browserify.js b/test/fixtures/errors/not_browserify.js new file mode 100644 index 0000000..4d12128 --- /dev/null +++ b/test/fixtures/errors/not_browserify.js @@ -0,0 +1 @@ +console.log('im not involved in this browserify business leave me alone') diff --git a/test/test.coffee b/test/test.coffee index b9e3868..3e84848 100644 --- a/test/test.coffee +++ b/test/test.coffee @@ -20,6 +20,11 @@ after -> # tests +describe 'errors', -> + + it 'should error if not given an out path', -> + (-> new Roots(path.join(_path, 'errors'))).should.throw("you must provide an 'out' path") + describe 'basic', -> before (done) -> compile_fixture.call(@, 'basic', -> done())