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
Sep 19, 2014
1 parent
9816db5
commit 2de778e
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
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,22 @@ | ||
var browserify = require('../'); | ||
var vm = require('vm'); | ||
var test = require('tap').test; | ||
|
||
test('array add', function (t) { | ||
var expected = [ 'ONE', 'TWO', 'THREE' ]; | ||
t.plan(expected.length); | ||
|
||
var b = browserify(); | ||
var files = [ | ||
__dirname + '/array/one.js', | ||
__dirname + '/array/two.js', | ||
__dirname + '/array/three.js' | ||
]; | ||
b.add(files); | ||
b.bundle(function (err, src) { | ||
vm.runInNewContext(src, { console: { log: log } }); | ||
function log (msg) { | ||
t.equal(msg, expected.shift()); | ||
} | ||
}); | ||
}); |
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 @@ | ||
console.log('ONE'); |
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 @@ | ||
console.log('THREE'); |
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 @@ | ||
console.log('TWO'); |