Created
April 5, 2020 11:22
-
-
Save anikethsaha/449a2842de41074bff810a7576c69213 to your computer and use it in GitHub Desktop.
Trying to test deterministicChunkIdsPlugin.test.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const path = require("path"); | |
const webpack = require("../"); | |
const { createFsFromVolume, Volume } = require("memfs"); | |
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin"); | |
describe("deterministic Plugin tests", () => { | |
jest.setTimeout(20000); | |
it("should run the chunk ids as a determinitic one", () => { | |
const compiler = createSimpleCompiler(); | |
compiler.run((err, stats) => { | |
if (err) throw err; | |
console.log(stats); // Nothing is printing here | |
}); | |
}); | |
}); | |
const createSimpleCompiler = (options = {}) => { | |
const compiler = webpack({ | |
context: path.join(__dirname, "fixtures"), | |
entry: "./a.js" | |
}); | |
compiler.outputFileSystem = createFsFromVolume(new Volume()); | |
new deterministicChunkIdsPlugin().apply(compiler); | |
return compiler; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment