From 5131b034cb130a7efbd05ef3039e76dfe8050ccb Mon Sep 17 00:00:00 2001 From: Jeff Escalante Date: Wed, 28 May 2014 16:15:51 -0400 Subject: [PATCH] boost test coverage to 100% --- test/fixtures/errors/app.coffee | 5 +++++ test/fixtures/errors/doge.js | 1 + test/fixtures/errors/index.js | 2 ++ test/fixtures/errors/not_browserify.js | 1 + test/test.coffee | 5 +++++ 5 files changed, 14 insertions(+) create mode 100644 test/fixtures/errors/app.coffee create mode 100644 test/fixtures/errors/doge.js create mode 100644 test/fixtures/errors/index.js create mode 100644 test/fixtures/errors/not_browserify.js 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())