add test cases
This commit is contained in:
parent
94bcce0b24
commit
53a7a342c5
|
@ -0,0 +1,3 @@
|
|||
import("./module");
|
||||
|
||||
it("should run", () => {});
|
|
@ -0,0 +1,21 @@
|
|||
module.exports = {
|
||||
output: {
|
||||
futureEmitAssets: true
|
||||
},
|
||||
plugins: [
|
||||
compiler => {
|
||||
const files = {};
|
||||
compiler.hooks.assetEmitted.tap("Test", (file, buffer) => {
|
||||
files[file] = Buffer.isBuffer(buffer);
|
||||
});
|
||||
compiler.hooks.afterEmit.tap("Test", () => {
|
||||
expect(files).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"1.bundle0.js": true,
|
||||
"bundle0.js": true,
|
||||
}
|
||||
`);
|
||||
});
|
||||
}
|
||||
]
|
||||
};
|
|
@ -0,0 +1,3 @@
|
|||
import("./module");
|
||||
|
||||
it("should run", () => {});
|
|
@ -0,0 +1,18 @@
|
|||
module.exports = {
|
||||
plugins: [
|
||||
compiler => {
|
||||
const files = {};
|
||||
compiler.hooks.assetEmitted.tap("Test", (file, buffer) => {
|
||||
files[file] = Buffer.isBuffer(buffer);
|
||||
});
|
||||
compiler.hooks.afterEmit.tap("Test", () => {
|
||||
expect(files).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"1.bundle0.js": true,
|
||||
"bundle0.js": true,
|
||||
}
|
||||
`);
|
||||
});
|
||||
}
|
||||
]
|
||||
};
|
Loading…
Reference in New Issue