refactor(Cypress): add nodemodules

This commit is contained in:
2021-09-02 17:18:41 +02:00
parent 1aa57bbd0a
commit bc6e1bc12e
4238 changed files with 340975 additions and 8 deletions

31
node_modules/module-deps/test/tr_no_entry.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
var mdeps = require('../');
var test = require('tap').test;
var JSONStream = require('JSONStream');
var packer = require('browser-pack');
var through = require('through2');
var concat = require('concat-stream');
var path = require('path');
test('transform no entry', function (t) {
t.plan(1);
var p = mdeps({
transform: [ function (file) {
return through(function (buf, enc, next) {
this.push(String(buf).replace(/AAA/g, '"WOW"'));
next();
});
} ]
});
p.end({
file: path.join(__dirname, '/files/tr_no_entry/main.js'),
id: 'xxx'
});
p.pipe(JSONStream.stringify()).pipe(packer())
.pipe(concat(function (body) {
var con = { log: function (x) { t.equal(x, 'WOW') } };
var src = 'require=' + body.toString('utf8') + ';require("xxx")';
Function('console', src)(con);
}))
;
});