2017-02-10 06:35:55 +08:00
|
|
|
"use strict";
|
|
|
|
|
|
2017-01-18 23:49:27 +08:00
|
|
|
const WebEnvironmentPlugin = require("../lib/web/WebEnvironmentPlugin");
|
2017-01-11 20:06:30 +08:00
|
|
|
|
2017-01-18 23:49:27 +08:00
|
|
|
describe("WebEnvironmentPlugin", () => {
|
2018-01-24 20:17:21 +08:00
|
|
|
describe("apply", () => {
|
2018-02-25 18:46:17 +08:00
|
|
|
const WebEnvironmentPluginInstance = new WebEnvironmentPlugin(
|
|
|
|
|
"inputFileSystem",
|
|
|
|
|
"outputFileSystem"
|
|
|
|
|
);
|
2018-01-24 20:17:21 +08:00
|
|
|
const compileSpy = {
|
|
|
|
|
outputFileSystem: "otherOutputFileSystem"
|
|
|
|
|
};
|
2017-01-11 20:06:30 +08:00
|
|
|
|
2018-01-24 20:17:21 +08:00
|
|
|
WebEnvironmentPluginInstance.apply(compileSpy);
|
2017-01-11 20:06:30 +08:00
|
|
|
|
2018-03-08 04:56:06 +08:00
|
|
|
it("should set compiler.outputFileSystem information with the same as set in WebEnvironmentPlugin", () => {
|
2018-02-25 18:46:17 +08:00
|
|
|
expect(compileSpy.outputFileSystem).toBe(
|
|
|
|
|
WebEnvironmentPluginInstance.outputFileSystem
|
|
|
|
|
);
|
2017-01-11 20:06:30 +08:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|