build: enable JS semicolons (#22783)

This commit is contained in:
Samuel Attard 2020-03-20 13:28:31 -07:00 committed by GitHub
parent 24e21467b9
commit 5d657dece4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
354 changed files with 21512 additions and 21510 deletions

View file

@ -1,12 +1,12 @@
import { expect } from 'chai'
import * as path from 'path'
import { BrowserWindow, ipcMain } from 'electron'
import { closeAllWindows } from './window-helpers'
import { expect } from 'chai';
import * as path from 'path';
import { BrowserWindow, ipcMain } from 'electron';
import { closeAllWindows } from './window-helpers';
describe('webFrame module', () => {
const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures')
const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures');
afterEach(closeAllWindows)
afterEach(closeAllWindows);
it('calls a spellcheck provider', async () => {
const w = new BrowserWindow({
@ -14,10 +14,10 @@ describe('webFrame module', () => {
webPreferences: {
nodeIntegration: true
}
})
await w.loadFile(path.join(fixtures, 'pages', 'webframe-spell-check.html'))
w.focus()
await w.webContents.executeJavaScript('document.querySelector("input").focus()', true)
});
await w.loadFile(path.join(fixtures, 'pages', 'webframe-spell-check.html'));
w.focus();
await w.webContents.executeJavaScript('document.querySelector("input").focus()', true);
const spellCheckerFeedback =
new Promise<[string[], boolean]>(resolve => {
@ -25,16 +25,16 @@ describe('webFrame module', () => {
if (words.length === 5) {
// The API calls the provider after every completed word.
// The promise is resolved only after this event is received with all words.
resolve([words, callbackDefined])
resolve([words, callbackDefined]);
}
})
})
const inputText = 'spleling test you\'re '
});
});
const inputText = 'spleling test you\'re ';
for (const keyCode of inputText) {
w.webContents.sendInputEvent({ type: 'char', keyCode })
w.webContents.sendInputEvent({ type: 'char', keyCode });
}
const [words, callbackDefined] = await spellCheckerFeedback
expect(words.sort()).to.deep.equal(['spleling', 'test', 'you\'re', 'you', 're'].sort())
expect(callbackDefined).to.be.true()
})
})
const [words, callbackDefined] = await spellCheckerFeedback;
expect(words.sort()).to.deep.equal(['spleling', 'test', 'you\'re', 'you', 're'].sort());
expect(callbackDefined).to.be.true();
});
});