From ae0c8881c3f908c32f11bf0f8a185f626734d3e3 Mon Sep 17 00:00:00 2001 From: Alexander Cyon Date: Thu, 22 Aug 2024 15:44:15 +0200 Subject: [PATCH] chore: fix typos in 'spec/' folder (and one in 'lib/' folder) (#43374) --- lib/browser/init.ts | 2 +- spec/api-crash-reporter-spec.ts | 2 +- spec/asar-integrity-spec.ts | 10 +++++----- spec/guest-window-manager-spec.ts | 2 +- spec/lib/screen-helpers.ts | 2 +- spec/modules-spec.ts | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/browser/init.ts b/lib/browser/init.ts index 49922ae57267..39fdc8cf80da 100644 --- a/lib/browser/init.ts +++ b/lib/browser/init.ts @@ -212,7 +212,7 @@ if (packagePath) { } }); } 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!(); process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false); Module._load(path.join(packagePath, mainStartupScript), Module, true); diff --git a/spec/api-crash-reporter-spec.ts b/spec/api-crash-reporter-spec.ts index a27da8d7e541..eb9bea35de01 100644 --- a/spec/api-crash-reporter-spec.ts +++ b/spec/api-crash-reporter-spec.ts @@ -180,7 +180,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ }); // 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 () => { const { port, waitForCrash } = await startServer(); let exitCode: number | null = null; diff --git a/spec/asar-integrity-spec.ts b/spec/asar-integrity-spec.ts index 4ecfb33d26b8..4e4c9dbf34ad 100644 --- a/spec/asar-integrity-spec.ts +++ b/spec/asar-integrity-spec.ts @@ -88,7 +88,7 @@ describe('fuses', function () { afterEach(async () => { 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)); try { await originalFs.promises.rm(tmpDir, { recursive: true }); @@ -133,7 +133,7 @@ describe('fuses', function () { it('fatals if the integrity header does not match', async () => { 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 expect(asar.toString()).to.contain('{"files":{"default_app.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 () => { 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 expect(asar.toString()).to.contain('Invalid 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 () => { 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 expect(asar.toString()).to.contain('require-trusted-types-for'); 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 () => { 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 expect(asar.toString()).to.contain('{"files":{"default_app.js"'); await originalFs.promises.writeFile(pathToAsar, bufferReplace(asar, '{"files":{"default_app.js"', '{"files":{"default_oop.js"')); diff --git a/spec/guest-window-manager-spec.ts b/spec/guest-window-manager-spec.ts index a625f2a7b839..1cb4795a8b08 100644 --- a/spec/guest-window-manager-spec.ts +++ b/spec/guest-window-manager-spec.ts @@ -303,7 +303,7 @@ describe('webContents.setWindowOpenHandler', () => { 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(resolve => { browserWindow.webContents.setWindowOpenHandler(() => { return { diff --git a/spec/lib/screen-helpers.ts b/spec/lib/screen-helpers.ts index f2bdbcb646a2..754884979580 100644 --- a/spec/lib/screen-helpers.ts +++ b/spec/lib/screen-helpers.ts @@ -50,7 +50,7 @@ function getPixelColor ( return `#${formatHexByte(r)}${formatHexByte(g)}${formatHexByte(b)}`; } -/** Calculate euclidian distance between colors. */ +/** Calculate euclidean distance between colors. */ function colorDistance (hexColorA: string, hexColorB: string): number { const colorA = hexToRgba(hexColorA); const colorB = hexToRgba(hexColorB); diff --git a/spec/modules-spec.ts b/spec/modules-spec.ts index 22cf62804310..8fd2c7dbe338 100644 --- a/spec/modules-spec.ts +++ b/spec/modules-spec.ts @@ -68,7 +68,7 @@ describe('modules support', () => { describe('q', () => { describe('Q.when', () => { - it('emits the fullfil callback', (done) => { + it('emits the fulfil callback', (done) => { const Q = require('q'); Q(true).then((val: boolean) => { expect(val).to.be.true();