chore: fix typos in 'spec/' folder (and one in 'lib/' folder) (#43374)
This commit is contained in:
parent
4ae43dcb3b
commit
ae0c8881c3
6 changed files with 10 additions and 10 deletions
|
@ -212,7 +212,7 @@ if (packagePath) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is syncronous
|
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is synchronous
|
||||||
appCodeLoaded!();
|
appCodeLoaded!();
|
||||||
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false);
|
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false);
|
||||||
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
||||||
|
|
|
@ -180,7 +180,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_
|
||||||
});
|
});
|
||||||
|
|
||||||
// Ensures that passing in crashpadHandlerPID flag for Linx child processes
|
// Ensures that passing in crashpadHandlerPID flag for Linx child processes
|
||||||
// does not affect child proocess args.
|
// does not affect child process args.
|
||||||
ifit(process.platform === 'linux')('ensure linux child process args are not modified', async () => {
|
ifit(process.platform === 'linux')('ensure linux child process args are not modified', async () => {
|
||||||
const { port, waitForCrash } = await startServer();
|
const { port, waitForCrash } = await startServer();
|
||||||
let exitCode: number | null = null;
|
let exitCode: number | null = null;
|
||||||
|
|
|
@ -88,7 +88,7 @@ describe('fuses', function () {
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
for (let attempt = 0; attempt <= 3; attempt++) {
|
for (let attempt = 0; attempt <= 3; attempt++) {
|
||||||
// Somtimes windows holds on to a DLL during the crash for a little bit, so we try a few times to delete it
|
// Sometimes windows holds on to a DLL during the crash for a little bit, so we try a few times to delete it
|
||||||
if (attempt > 0) await new Promise((resolve) => setTimeout(resolve, 500 * attempt));
|
if (attempt > 0) await new Promise((resolve) => setTimeout(resolve, 500 * attempt));
|
||||||
try {
|
try {
|
||||||
await originalFs.promises.rm(tmpDir, { recursive: true });
|
await originalFs.promises.rm(tmpDir, { recursive: true });
|
||||||
|
@ -133,7 +133,7 @@ describe('fuses', function () {
|
||||||
|
|
||||||
it('fatals if the integrity header does not match', async () => {
|
it('fatals if the integrity header does not match', async () => {
|
||||||
const asar = await originalFs.promises.readFile(pathToAsar);
|
const asar = await originalFs.promises.readFile(pathToAsar);
|
||||||
// Ensure that the header stil starts with the same thing, if build system
|
// Ensure that the header still starts with the same thing, if build system
|
||||||
// things result in the header changing we should update this test
|
// things result in the header changing we should update this test
|
||||||
expect(asar.toString()).to.contain('{"files":{"default_app.js"');
|
expect(asar.toString()).to.contain('{"files":{"default_app.js"');
|
||||||
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, '{"files":{"default_app.js"', '{"files":{"default_oop.js"'));
|
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, '{"files":{"default_app.js"', '{"files":{"default_oop.js"'));
|
||||||
|
@ -145,7 +145,7 @@ describe('fuses', function () {
|
||||||
|
|
||||||
it('fatals if a loaded main process JS file does not match', async () => {
|
it('fatals if a loaded main process JS file does not match', async () => {
|
||||||
const asar = await originalFs.promises.readFile(pathToAsar);
|
const asar = await originalFs.promises.readFile(pathToAsar);
|
||||||
// Ensure that the header stil starts with the same thing, if build system
|
// Ensure that the header still starts with the same thing, if build system
|
||||||
// things result in the header changing we should update this test
|
// things result in the header changing we should update this test
|
||||||
expect(asar.toString()).to.contain('Invalid Usage');
|
expect(asar.toString()).to.contain('Invalid Usage');
|
||||||
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, 'Invalid Usage', 'VVValid Usage'));
|
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, 'Invalid Usage', 'VVValid Usage'));
|
||||||
|
@ -158,7 +158,7 @@ describe('fuses', function () {
|
||||||
|
|
||||||
it('fatals if a renderer content file does not match', async () => {
|
it('fatals if a renderer content file does not match', async () => {
|
||||||
const asar = await originalFs.promises.readFile(pathToAsar);
|
const asar = await originalFs.promises.readFile(pathToAsar);
|
||||||
// Ensure that the header stil starts with the same thing, if build system
|
// Ensure that the header still starts with the same thing, if build system
|
||||||
// things result in the header changing we should update this test
|
// things result in the header changing we should update this test
|
||||||
expect(asar.toString()).to.contain('require-trusted-types-for');
|
expect(asar.toString()).to.contain('require-trusted-types-for');
|
||||||
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, 'require-trusted-types-for', 'require-trusted-types-not'));
|
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, 'require-trusted-types-for', 'require-trusted-types-not'));
|
||||||
|
@ -176,7 +176,7 @@ describe('fuses', function () {
|
||||||
|
|
||||||
it('does nothing if the integrity header does not match', async () => {
|
it('does nothing if the integrity header does not match', async () => {
|
||||||
const asar = await originalFs.promises.readFile(pathToAsar);
|
const asar = await originalFs.promises.readFile(pathToAsar);
|
||||||
// Ensure that the header stil starts with the same thing, if build system
|
// Ensure that the header still starts with the same thing, if build system
|
||||||
// things result in the header changing we should update this test
|
// things result in the header changing we should update this test
|
||||||
expect(asar.toString()).to.contain('{"files":{"default_app.js"');
|
expect(asar.toString()).to.contain('{"files":{"default_app.js"');
|
||||||
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, '{"files":{"default_app.js"', '{"files":{"default_oop.js"'));
|
await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, '{"files":{"default_app.js"', '{"files":{"default_oop.js"'));
|
||||||
|
|
|
@ -303,7 +303,7 @@ describe('webContents.setWindowOpenHandler', () => {
|
||||||
expect(childWindow.title).to.equal(browserWindowTitle);
|
expect(childWindow.title).to.equal(browserWindowTitle);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('spawns browser window with overriden options', async () => {
|
it('spawns browser window with overridden options', async () => {
|
||||||
const childWindow = await new Promise<Electron.BrowserWindow>(resolve => {
|
const childWindow = await new Promise<Electron.BrowserWindow>(resolve => {
|
||||||
browserWindow.webContents.setWindowOpenHandler(() => {
|
browserWindow.webContents.setWindowOpenHandler(() => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -50,7 +50,7 @@ function getPixelColor (
|
||||||
return `#${formatHexByte(r)}${formatHexByte(g)}${formatHexByte(b)}`;
|
return `#${formatHexByte(r)}${formatHexByte(g)}${formatHexByte(b)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Calculate euclidian distance between colors. */
|
/** Calculate euclidean distance between colors. */
|
||||||
function colorDistance (hexColorA: string, hexColorB: string): number {
|
function colorDistance (hexColorA: string, hexColorB: string): number {
|
||||||
const colorA = hexToRgba(hexColorA);
|
const colorA = hexToRgba(hexColorA);
|
||||||
const colorB = hexToRgba(hexColorB);
|
const colorB = hexToRgba(hexColorB);
|
||||||
|
|
|
@ -68,7 +68,7 @@ describe('modules support', () => {
|
||||||
|
|
||||||
describe('q', () => {
|
describe('q', () => {
|
||||||
describe('Q.when', () => {
|
describe('Q.when', () => {
|
||||||
it('emits the fullfil callback', (done) => {
|
it('emits the fulfil callback', (done) => {
|
||||||
const Q = require('q');
|
const Q = require('q');
|
||||||
Q(true).then((val: boolean) => {
|
Q(true).then((val: boolean) => {
|
||||||
expect(val).to.be.true();
|
expect(val).to.be.true();
|
||||||
|
|
Loading…
Reference in a new issue