check more files and fix spelling issues
This commit is contained in:
parent
a19d7991c3
commit
05f2196d61
17
cspell.json
17
cspell.json
|
@ -5,6 +5,7 @@
|
|||
"absolutify",
|
||||
"acircular",
|
||||
"amdmodule",
|
||||
"asmjs",
|
||||
"assemblyscript",
|
||||
"asyncloader",
|
||||
"atlaskit",
|
||||
|
@ -12,6 +13,7 @@
|
|||
"babeljs",
|
||||
"backport",
|
||||
"backported",
|
||||
"basictest",
|
||||
"bigint",
|
||||
"Biró",
|
||||
"bitfield",
|
||||
|
@ -277,7 +279,12 @@
|
|||
"xxhashjs",
|
||||
"Yann"
|
||||
],
|
||||
"ignoreRegExpList": ["/Author.+/", "/data:.*/", "/\"mappings\":\".+\"/"],
|
||||
"ignoreRegExpList": [
|
||||
"/Author.+/",
|
||||
"/data:.*/",
|
||||
"/\"mappings\":\".+\"/",
|
||||
"/toMatchInlineSnapshot\\(\\s*`[^`]*`\\s*\\)/"
|
||||
],
|
||||
"ignorePaths": [
|
||||
"**/dist/**",
|
||||
"examples/**/README.md",
|
||||
|
@ -288,8 +295,14 @@
|
|||
"**/**/*.snap",
|
||||
"test/cases/json/weird-properties/globals.json",
|
||||
"**/*.svg",
|
||||
"*.log",
|
||||
"**/*.wasm",
|
||||
"coverage/**",
|
||||
"test/**/module.js",
|
||||
"test/**"
|
||||
"test/js/**",
|
||||
"test/cases/**",
|
||||
"test/configCases/**",
|
||||
"test/statsCases/**",
|
||||
"test/fixtures/**"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -185,6 +185,7 @@ describe("Compiler", () => {
|
|||
});
|
||||
});
|
||||
|
||||
// cspell:word asmjs
|
||||
it("should not evaluate constants in asm.js", done => {
|
||||
compile("./asmjs", {}, (stats, files) => {
|
||||
expect(Object.keys(files)).toEqual(["/main.js"]);
|
||||
|
|
|
@ -9,24 +9,24 @@ const stripAnsi = require("strip-ansi");
|
|||
* @param {string} str String to quote
|
||||
* @returns {string} Escaped string
|
||||
*/
|
||||
const quotemeta = str => {
|
||||
const quoteMeta = str => {
|
||||
return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&");
|
||||
};
|
||||
|
||||
describe("Defaults", () => {
|
||||
const cwd = process.cwd();
|
||||
const cwdRegExp = new RegExp(
|
||||
`${quotemeta(cwd)}((?:\\\\)?(?:[a-zA-Z.\\-_]+\\\\)*)`,
|
||||
`${quoteMeta(cwd)}((?:\\\\)?(?:[a-zA-Z.\\-_]+\\\\)*)`,
|
||||
"g"
|
||||
);
|
||||
const escapedCwd = JSON.stringify(cwd).slice(1, -1);
|
||||
const escapedCwdRegExp = new RegExp(
|
||||
`${quotemeta(escapedCwd)}((?:\\\\\\\\)?(?:[a-zA-Z.\\-_]+\\\\\\\\)*)`,
|
||||
`${quoteMeta(escapedCwd)}((?:\\\\\\\\)?(?:[a-zA-Z.\\-_]+\\\\\\\\)*)`,
|
||||
"g"
|
||||
);
|
||||
const normalize = str => {
|
||||
if (cwd.startsWith("/")) {
|
||||
str = str.replace(new RegExp(quotemeta(cwd), "g"), "<cwd>");
|
||||
str = str.replace(new RegExp(quoteMeta(cwd), "g"), "<cwd>");
|
||||
} else {
|
||||
str = str.replace(cwdRegExp, (m, g) => `<cwd>${g.replace(/\\/g, "/")}`);
|
||||
str = str.replace(
|
||||
|
@ -1439,7 +1439,7 @@ describe("Defaults", () => {
|
|||
+ "recordsOutputPath": "some-path",
|
||||
`)
|
||||
);
|
||||
test("ecamVersion", { output: { ecmaVersion: 2020 } }, e =>
|
||||
test("ecmaVersion", { output: { ecmaVersion: 2020 } }, e =>
|
||||
e.toMatchInlineSnapshot(`Compared values have no visual difference.`)
|
||||
);
|
||||
test("single runtimeChunk", { optimization: { runtimeChunk: "single" } }, e =>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
|
||||
// cspell:ignore fghsub notry fghsub notry notry this's ijksub this's ijksub fghsub fghsub notry ijksub ijksub strrring strrring strr strrring strrring strr Sstrrringy strone stronetwo stronetwothree stronetwo stronetwothree stronetwothreefour onetwo onetwo twothree twothree twothree threefour onetwo onetwo threefour threefour fourfive startstrmid igmy igmyi igmya
|
||||
const BasicEvaluatedExpression = require("../lib/javascript/BasicEvaluatedExpression");
|
||||
const JavascriptParser = require("../lib/javascript/JavascriptParser");
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ require("./helpers/warmup-webpack");
|
|||
|
||||
const path = require("path");
|
||||
|
||||
// cspell:word nodetest
|
||||
describe("NodeTemplatePlugin", () => {
|
||||
jest.setTimeout(20000);
|
||||
it("should compile and run a simple module", done => {
|
||||
|
|
|
@ -91,6 +91,7 @@ describe("NormalModule", () => {
|
|||
});
|
||||
describe("given a userRequest containing query parameters", () => {
|
||||
it("ignores paths in query parameters", () => {
|
||||
// cspell:word testpath
|
||||
userRequest =
|
||||
"F:\\some\\context\\loader?query=foo\\bar&otherPath=testpath/other";
|
||||
normalModule = new NormalModule({
|
||||
|
@ -284,7 +285,7 @@ describe("NormalModule", () => {
|
|||
});
|
||||
});
|
||||
describe("that is an array", () => {
|
||||
describe("of strings and or regexs", () => {
|
||||
describe("of strings and or regexps", () => {
|
||||
let someRules;
|
||||
beforeEach(() => {
|
||||
someRules = ["some rule", /some rule1/, "some rule2"];
|
||||
|
|
|
@ -4,7 +4,7 @@ const path = require("path");
|
|||
const ProfilingPlugin = require("../lib/debug/ProfilingPlugin");
|
||||
|
||||
describe("Profiling Plugin", () => {
|
||||
it("should persist the passed outpath", () => {
|
||||
it("should persist the passed output path", () => {
|
||||
const outputPath = path.join(__dirname, "invest_in_doge_coin");
|
||||
const plugin = new ProfilingPlugin({
|
||||
outputPath: outputPath
|
||||
|
@ -34,7 +34,7 @@ describe("Profiling Plugin", () => {
|
|||
|
||||
it("handles sending a profiling message when no session", () => {
|
||||
const profiler = new ProfilingPlugin.Profiler();
|
||||
return profiler.sendCommand("randy", "is a puppers");
|
||||
return profiler.sendCommand("randy", "is awesome");
|
||||
});
|
||||
|
||||
it("handles destroying when no session", () => {
|
||||
|
|
|
@ -190,6 +190,7 @@ describe("ProgressPlugin", function () {
|
|||
|
||||
expect(logs.length).toBeGreaterThan(20);
|
||||
logs.forEach(log => expect(log.length).toBeLessThanOrEqual(35));
|
||||
// cspell:ignore mization nsPlugin
|
||||
expect(logs).toContain(
|
||||
"75% sealing ...mization ...nsPlugin",
|
||||
"trims each detail string equally"
|
||||
|
|
|
@ -25,7 +25,7 @@ See also: [Jest CLI docs](https://jestjs.io/docs/cli)
|
|||
We use Jest for our tests. For more information on Jest you can visit their [homepage](https://jestjs.io/)!
|
||||
|
||||
### Class Tests
|
||||
All test files can be found in *.test.js. There are many tests that simply test API's of a specific class/file (such as `Compiler`, `Errors`, Integration, `Parser`, `RuleSet`, Validation).
|
||||
All test files can be found in *.test.js. There are many tests that simply test APIs of a specific class/file (such as `Compiler`, `Errors`, Integration, `Parser`, `RuleSet`, Validation).
|
||||
If the feature you are contributing involves one of those classes, then best to start there to understand the structure.
|
||||
|
||||
### xCases
|
||||
|
@ -69,4 +69,4 @@ If you are still nervous or don't quite understand, please submit an issue and t
|
|||
|
||||
|
||||
## Footnotes
|
||||
<sup>1</sup> webpack's parser supports the use of ES2015 features like arrow functions, harmony exports, etc. However as a library we follow NodeJS's timeline for dropping older versions of node. Because of this we expect your tests on Travis to pass all the way back to NodeJS v10; Therefore if you would like specific tests that use these features to be ignored if they are not supported, then you should add a `test.filter.js` file. This allows you to import the syntax needed for that test, meanwhile ignoring it on node versions (during CI) that don't support it. webpack has a variety of helpful examples you can refer to if you are just starting out. See the `./helpers` folder to find a list of the versions.
|
||||
<sup>1</sup> webpack's parser supports the use of ES2015 features like arrow functions, harmony exports, etc. However as a library we follow Node.js' timeline for dropping older versions of node. Because of this we expect your tests on Travis to pass all the way back to NodeJS v10; Therefore if you would like specific tests that use these features to be ignored if they are not supported, then you should add a `test.filter.js` file. This allows you to import the syntax needed for that test, meanwhile ignoring it on node versions (during CI) that don't support it. webpack has a variety of helpful examples you can refer to if you are just starting out. See the `./helpers` folder to find a list of the versions.
|
||||
|
|
|
@ -12,7 +12,7 @@ const webpack = require("..");
|
|||
* @param {string} str String to quote
|
||||
* @returns {string} Escaped string
|
||||
*/
|
||||
const quotemeta = str => {
|
||||
const quoteMeta = str => {
|
||||
return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&");
|
||||
};
|
||||
|
||||
|
@ -184,11 +184,12 @@ describe("StatsTestCases", () => {
|
|||
.replace(/\u001b\[([0-9;]*)m/g, "<CLR=$1>")
|
||||
.replace(/[.0-9]+(<\/CLR>)?(\s?ms)/g, "X$1$2");
|
||||
}
|
||||
// cspell:ignore Xdir
|
||||
const testPath = path.join(base, testName);
|
||||
actual = actual
|
||||
.replace(/\r\n?/g, "\n")
|
||||
.replace(/webpack [^ )]+(\)?) compiled/g, "webpack x.x.x$1 compiled")
|
||||
.replace(new RegExp(quotemeta(testPath), "g"), "Xdir/" + testName)
|
||||
.replace(new RegExp(quoteMeta(testPath), "g"), "Xdir/" + testName)
|
||||
.replace(/(\w)\\(\w)/g, "$1/$2")
|
||||
.replace(/, additional resolving: X ms/g, "");
|
||||
expect(actual).toMatchSnapshot();
|
||||
|
|
|
@ -16,6 +16,7 @@ describe("Template", () => {
|
|||
items.push(item);
|
||||
}
|
||||
});
|
||||
// cspell:ignore sdfas sadfome
|
||||
it("should generate sanitized path identifiers", () => {
|
||||
expect(Template.toPath("path/to-sdfas/sadfome$$.js")).toBe(
|
||||
"path-to-sdfas-sadfome$$-js"
|
||||
|
|
|
@ -139,6 +139,7 @@ for (const name of Object.keys(wasmHashes)) {
|
|||
unicodeTest(name, codePoints);
|
||||
};
|
||||
|
||||
// cspell:word Thaana
|
||||
unicodeRangeTest("Latin-1 Supplement", 0xa0, 0xff);
|
||||
unicodeRangeTest("Latin Extended", 0x100, 0x24f);
|
||||
unicodeRangeTest("Thaana", 0x780, 0x7bf);
|
||||
|
|
|
@ -126,6 +126,7 @@ if (process.env.DEBUG_INFO) {
|
|||
it = addDebugInfo(it);
|
||||
}
|
||||
|
||||
// cspell:word wabt
|
||||
// Workaround for a memory leak in wabt
|
||||
// It leaks an Error object on construction
|
||||
// so it leaks the whole stack trace
|
||||
|
|
Loading…
Reference in New Issue