Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
James Halliday
committed
Jul 24, 2014
1 parent
e713e99
commit 89058e7
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
var browserify = require('../'); | ||
var vm = require('vm'); | ||
var test = require('tap').test; | ||
|
||
test('plugin fn', function (t) { | ||
t.plan(2); | ||
|
||
var b = browserify(__dirname + '/plugin/main.js'); | ||
b.plugin(function (b_) { | ||
t.equal(b, b_); | ||
}); | ||
|
||
b.bundle(function (err, src) { | ||
t.ifError(err); | ||
}); | ||
}); | ||
|
||
test('plugin module', function (t) { | ||
t.plan(2); | ||
|
||
var b = browserify(__dirname + '/plugin/main.js'); | ||
b.plugin('plugin-foo', { msg: 'beep boop' }); | ||
|
||
b.bundle(function (err, src) { | ||
t.ifError(err); | ||
t.equal(src, 'beep boop'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = 555 |