Skip to content
Browse files

failing twice test

  • Loading branch information...
1 parent 689d346 commit 4954b0f581e5fa79301bc9d1dcff7031e4c92013 @substack committed Jul 4, 2011
Showing with 24 additions and 0 deletions.
  1. +23 −0 test/twice.js
  2. +1 −0 test/two/a.txt
View
23 test/twice.js
@@ -0,0 +1,23 @@
+var assert = require('assert');
+var browserify = require('browserify');
+var fileify = require('../');
+var vm = require('vm');
+
+exports.twice = function () {
+ var src = browserify()
+ .use(fileify('one', __dirname + '/static'))
+ .use(fileify('two', __dirname + '/two'))
+ .bundle()
+ ;
+
+ var c = {};
+ vm.runInNewContext(src, c);
+ assert.deepEqual(c.require('one'), {
+ 'bar.sh' : '#!/bin/bash\necho bar!\n',
+ 'foo.txt' : 'This is the foo file!\n',
+ 'baz/quux.js' : 'console.log(\'quux!\')\n',
+ });
+ assert.deepEqual(c.require('two'), {
+ 'a.txt' : 'Aa97\n',
+ });
+};
View
1 test/two/a.txt
@@ -0,0 +1 @@
+Aa97

0 comments on commit 4954b0f

Please sign in to comment.
Something went wrong with that request. Please try again.