Browse Source

chore: fix typos in 'spec/' folder (and one in 'lib/' folder) (#43432)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alexander Cyon <[email protected]>
trop[bot] 8 months ago
parent
commit
e08be7d8ce

+ 1 - 1
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);

+ 1 - 1
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;

+ 5 - 5
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"'));

+ 1 - 1
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<Electron.BrowserWindow>(resolve => {
         browserWindow.webContents.setWindowOpenHandler(() => {
           return {

+ 1 - 1
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);

+ 1 - 1
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();