Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tleunen committed May 2, 2015
1 parent 5c9d2df commit f310895
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/browserify.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ describe('grunt-browserify-runner', function () {
it('passes the options hash along with the transform fn', function (done) {
var transforms = [[function () {}, {}]];
runner.run([], dest, {transform: transforms}, function () {
assert.ok(b().transform.calledWith(transforms[0][1], transforms[0][0]));
assert.ok(b().transform.calledWith(transforms[0]));
done();
});
});
Expand Down Expand Up @@ -307,20 +307,19 @@ describe('grunt-browserify-runner', function () {
it('registers the plugin', function (done) {
var b = stubBrowserify('plugin');
var runner = createRunner(b);
var plugin = function () {};
runner.run([], dest, {plugin: [plugin]}, function () {
assert.ok(b().plugin.calledWith(plugin));
var plugin = [function () {}];
runner.run([], dest, {plugin: plugin}, function () {
assert.ok(b().plugin.calledWith(plugin[0]));
done();
});
});
context('and when passing plugin options', function () {
it('registers the plugin options', function (done) {
var b = stubBrowserify('plugin');
var runner = createRunner(b);
var plugin = function () {};
var opts = {};
runner.run([], dest, {plugin: [[plugin, opts]]}, function () {
assert.ok(b().plugin.calledWith(plugin, opts));
var plugin = [[function () {}, {}]];
runner.run([], dest, {plugin: plugin}, function () {
assert.ok(b().plugin.calledWith(plugin[0]));
done();
});
});
Expand Down

0 comments on commit f310895

Please sign in to comment.