mirror of https://github.com/webpack/webpack.git
fix prettierignore file and run prettier
This commit is contained in:
parent
75c2784bc5
commit
75a9a515fd
|
@ -1,8 +1,8 @@
|
||||||
# Ignore test fixtures
|
# Ignore test fixtures
|
||||||
test
|
test/*.*
|
||||||
!test/*.js
|
!test/*.js
|
||||||
!test/**/webpack.config.js
|
!test/**/webpack.config.js
|
||||||
|
|
||||||
# Ignore example fixtures
|
# Ignore example fixtures
|
||||||
examples
|
examples/*.*
|
||||||
!examples/**/webpack.config.js
|
!examples/**/webpack.config.js
|
||||||
|
|
|
@ -279,9 +279,9 @@ describe("BenchmarkTestCases", function() {
|
||||||
describe(`${testName} create benchmarks`, function() {
|
describe(`${testName} create benchmarks`, function() {
|
||||||
baselines.forEach(baseline => {
|
baselines.forEach(baseline => {
|
||||||
let baselineStats = null;
|
let baselineStats = null;
|
||||||
it(
|
it(`should benchmark ${baseline.name} (${
|
||||||
`should benchmark ${baseline.name} (${baseline.rev})`,
|
baseline.rev
|
||||||
function(done) {
|
})`, function(done) {
|
||||||
const outputDirectory = path.join(
|
const outputDirectory = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
"js",
|
"js",
|
||||||
|
@ -305,13 +305,9 @@ describe("BenchmarkTestCases", function() {
|
||||||
else baselineStats = stats;
|
else baselineStats = stats;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
},
|
}, 180000);
|
||||||
180000
|
|
||||||
);
|
|
||||||
|
|
||||||
it(
|
it(`should benchmark ${baseline.name} (${baseline.rev})`, done => {
|
||||||
`should benchmark ${baseline.name} (${baseline.rev})`,
|
|
||||||
done => {
|
|
||||||
const outputDirectory = path.join(
|
const outputDirectory = path.join(
|
||||||
__dirname,
|
__dirname,
|
||||||
"js",
|
"js",
|
||||||
|
@ -333,9 +329,7 @@ describe("BenchmarkTestCases", function() {
|
||||||
else baselineStats = stats;
|
else baselineStats = stats;
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
},
|
}, 180000);
|
||||||
180000
|
|
||||||
);
|
|
||||||
|
|
||||||
if (baseline.name !== "HEAD") {
|
if (baseline.name !== "HEAD") {
|
||||||
it(`HEAD should not be slower than ${baseline.name} (${
|
it(`HEAD should not be slower than ${baseline.name} (${
|
||||||
|
|
|
@ -503,9 +503,9 @@ describe("Compiler", () => {
|
||||||
output: {
|
output: {
|
||||||
path: "/",
|
path: "/",
|
||||||
filename: "bundle.js"
|
filename: "bundle.js"
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
compiler.hooks.failed.tap('CompilerTest', failedSpy);
|
compiler.hooks.failed.tap("CompilerTest", failedSpy);
|
||||||
compiler.outputFileSystem = new MemoryFs();
|
compiler.outputFileSystem = new MemoryFs();
|
||||||
compiler.run((err, stats) => {
|
compiler.run((err, stats) => {
|
||||||
expect(err).toBeTruthy();
|
expect(err).toBeTruthy();
|
||||||
|
|
|
@ -58,14 +58,16 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("with line-to-line true", () => {
|
describe("with line-to-line true", () => {
|
||||||
beforeEach(() =>
|
beforeEach(
|
||||||
|
() =>
|
||||||
(eventBindings = applyPluginWithOptions(
|
(eventBindings = applyPluginWithOptions(
|
||||||
SourceMapDevToolModuleOptionsPlugin,
|
SourceMapDevToolModuleOptionsPlugin,
|
||||||
{
|
{
|
||||||
module: false,
|
module: false,
|
||||||
lineToLine: true
|
lineToLine: true
|
||||||
}
|
}
|
||||||
)));
|
))
|
||||||
|
);
|
||||||
|
|
||||||
it("binds one event handler", () => {
|
it("binds one event handler", () => {
|
||||||
expect(eventBindings.length).toBe(1);
|
expect(eventBindings.length).toBe(1);
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
const Stats = require("../lib/Stats");
|
const Stats = require("../lib/Stats");
|
||||||
const packageJson = require("../package.json");
|
const packageJson = require("../package.json");
|
||||||
|
|
||||||
describe(
|
describe("Stats", () => {
|
||||||
"Stats",
|
|
||||||
() => {
|
|
||||||
describe("formatFilePath", () => {
|
describe("formatFilePath", () => {
|
||||||
it("emit the file path and request", () => {
|
it("emit the file path and request", () => {
|
||||||
const mockStats = new Stats({
|
const mockStats = new Stats({
|
||||||
|
@ -204,6 +202,4 @@ describe(
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
}, 10000);
|
||||||
10000
|
|
||||||
);
|
|
||||||
|
|
|
@ -7,9 +7,7 @@ module.exports = {
|
||||||
output: {
|
output: {
|
||||||
filename: "[name].js"
|
filename: "[name].js"
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [new IgnorePlugin(/intentionally-missing-module/)],
|
||||||
new IgnorePlugin(/intentionally-missing-module/)
|
|
||||||
],
|
|
||||||
node: {
|
node: {
|
||||||
__dirname: false
|
__dirname: false
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const Compiler = require('../../../../lib/Compiler');
|
const Compiler = require("../../../../lib/Compiler");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
optimization: {
|
optimization: {
|
||||||
|
@ -7,12 +7,12 @@ module.exports = {
|
||||||
{
|
{
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
expect(compiler).toBeInstanceOf(Compiler);
|
expect(compiler).toBeInstanceOf(Compiler);
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
function(compiler) {
|
function(compiler) {
|
||||||
expect(compiler).toBe(this);
|
expect(compiler).toBe(this);
|
||||||
expect(compiler).toBeInstanceOf(Compiler);
|
expect(compiler).toBeInstanceOf(Compiler);
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -103,5 +103,5 @@ module.exports = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stats
|
stats
|
||||||
},
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -8,12 +8,9 @@ const valueFile = path.resolve(
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
TEST_VALUE: webpack.DefinePlugin.runtimeValue(
|
TEST_VALUE: webpack.DefinePlugin.runtimeValue(() => {
|
||||||
() => {
|
|
||||||
return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim());
|
return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim());
|
||||||
},
|
}, [valueFile]),
|
||||||
[valueFile]
|
|
||||||
),
|
|
||||||
TEST_VALUE2: webpack.DefinePlugin.runtimeValue(() => {
|
TEST_VALUE2: webpack.DefinePlugin.runtimeValue(() => {
|
||||||
return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim());
|
return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim());
|
||||||
}, []),
|
}, []),
|
||||||
|
|
Loading…
Reference in New Issue