refactor: init cypress-cucumber-preprocessor install.
This commit is contained in:
24
node_modules/browser-pack/test/this.js
generated
vendored
Normal file
24
node_modules/browser-pack/test/this.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* In node.js `this` on the module root is the same as `exports`. Browser-pack
|
||||
* should act like it too.
|
||||
**/
|
||||
var test = require('tap').test;
|
||||
var pack = require('../');
|
||||
|
||||
test('this', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var p = pack();
|
||||
var src = '';
|
||||
p.on('data', function (buf) { src += buf; });
|
||||
p.on('end', function () {
|
||||
var r = Function([], 'return ' + src)();
|
||||
t.deepEqual(r("abc"), { foo: "bar" });
|
||||
});
|
||||
|
||||
p.end(JSON.stringify([{
|
||||
id: 'abc',
|
||||
source: 'this.foo = "bar"'
|
||||
}]));
|
||||
|
||||
});
|
Reference in New Issue
Block a user