fix prettierignore file and run prettier

This commit is contained in:
Tobias Koppers 2019-02-18 09:09:46 +01:00
parent 75c2784bc5
commit 75a9a515fd
9 changed files with 236 additions and 249 deletions

View File

@ -1,8 +1,8 @@
# Ignore test fixtures
test
test/*.*
!test/*.js
!test/**/webpack.config.js
# Ignore example fixtures
examples
examples/*.*
!examples/**/webpack.config.js

View File

@ -279,9 +279,9 @@ describe("BenchmarkTestCases", function() {
describe(`${testName} create benchmarks`, function() {
baselines.forEach(baseline => {
let baselineStats = null;
it(
`should benchmark ${baseline.name} (${baseline.rev})`,
function(done) {
it(`should benchmark ${baseline.name} (${
baseline.rev
})`, function(done) {
const outputDirectory = path.join(
__dirname,
"js",
@ -305,13 +305,9 @@ describe("BenchmarkTestCases", function() {
else baselineStats = stats;
done();
});
},
180000
);
}, 180000);
it(
`should benchmark ${baseline.name} (${baseline.rev})`,
done => {
it(`should benchmark ${baseline.name} (${baseline.rev})`, done => {
const outputDirectory = path.join(
__dirname,
"js",
@ -333,9 +329,7 @@ describe("BenchmarkTestCases", function() {
else baselineStats = stats;
done();
});
},
180000
);
}, 180000);
if (baseline.name !== "HEAD") {
it(`HEAD should not be slower than ${baseline.name} (${

View File

@ -503,9 +503,9 @@ describe("Compiler", () => {
output: {
path: "/",
filename: "bundle.js"
},
}
});
compiler.hooks.failed.tap('CompilerTest', failedSpy);
compiler.hooks.failed.tap("CompilerTest", failedSpy);
compiler.outputFileSystem = new MemoryFs();
compiler.run((err, stats) => {
expect(err).toBeTruthy();

View File

@ -58,14 +58,16 @@ describe("SourceMapDevToolModuleOptionsPlugin", () => {
});
describe("with line-to-line true", () => {
beforeEach(() =>
beforeEach(
() =>
(eventBindings = applyPluginWithOptions(
SourceMapDevToolModuleOptionsPlugin,
{
module: false,
lineToLine: true
}
)));
))
);
it("binds one event handler", () => {
expect(eventBindings.length).toBe(1);

View File

@ -4,9 +4,7 @@
const Stats = require("../lib/Stats");
const packageJson = require("../package.json");
describe(
"Stats",
() => {
describe("Stats", () => {
describe("formatFilePath", () => {
it("emit the file path and request", () => {
const mockStats = new Stats({
@ -204,6 +202,4 @@ describe(
});
});
});
},
10000
);
}, 10000);

View File

@ -7,9 +7,7 @@ module.exports = {
output: {
filename: "[name].js"
},
plugins: [
new IgnorePlugin(/intentionally-missing-module/)
],
plugins: [new IgnorePlugin(/intentionally-missing-module/)],
node: {
__dirname: false
}

View File

@ -1,4 +1,4 @@
const Compiler = require('../../../../lib/Compiler');
const Compiler = require("../../../../lib/Compiler");
module.exports = {
optimization: {
@ -7,12 +7,12 @@ module.exports = {
{
apply(compiler) {
expect(compiler).toBeInstanceOf(Compiler);
},
}
},
function(compiler) {
expect(compiler).toBe(this);
expect(compiler).toBeInstanceOf(Compiler);
}
],
},
]
}
};

View File

@ -103,5 +103,5 @@ module.exports = [
}
},
stats
},
}
];

View File

@ -8,12 +8,9 @@ const valueFile = path.resolve(
module.exports = {
plugins: [
new webpack.DefinePlugin({
TEST_VALUE: webpack.DefinePlugin.runtimeValue(
() => {
TEST_VALUE: webpack.DefinePlugin.runtimeValue(() => {
return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim());
},
[valueFile]
),
}, [valueFile]),
TEST_VALUE2: webpack.DefinePlugin.runtimeValue(() => {
return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim());
}, []),