Skip to content

Commit

Permalink
[fix] Introduce assume as global library
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd-Eden committed Jul 9, 2014
1 parent 5ce37e2 commit c1efcb2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,25 @@ module.exports = function compile(files, options, fn) {
options = {};
}

var b = browserify(options);

//
// Introduce our `assume` library by default in to the package so you only
// need Illuminati to start testing your applications and add all other files
// that are needed to test all the things.
//
b.require('assume');
options.builtins = require('browserify/lib/builtins.js');
options.builtins.assume = require.resolve('assume');

var b = browserify(options);

//
// Add all the test files as entry files so they will be executed when the
// browserify bundle is loaded. If they are not executed, we will not be able
// to run the test suite.
//
files.forEach(b.add.bind(b));

b.bundle({
debug: true // Ensure that browserify is compiled with source-maps.
debug: true // Ensure that browserify is compiled with source-maps.
}, function bundled(err, source) {
if (err) return fn(err);

Expand Down

0 comments on commit c1efcb2

Please sign in to comment.