nyc-bookstores/node_modules/browserify/test/json.js

19 lines
446 B
JavaScript
Raw Normal View History

2013-05-27 20:45:59 +00:00
var browserify = require('../');
var vm = require('vm');
var test = require('tap').test;
test('json', function (t) {
t.plan(1);
var b = browserify();
b.add(__dirname + '/json/main.js');
b.bundle(function (err, src) {
if (err) t.fail(err);
var c = {
ex : function (obj) {
t.same(obj, { beep : 'boop', x : 555 });
}
};
vm.runInNewContext(src, c);
});
});