From eba86b2e7f08388d7536784b1e6403ae02c857e8 Mon Sep 17 00:00:00 2001 From: Sean Beard Date: Sat, 28 Mar 2020 12:31:42 -0600 Subject: [PATCH] fastpass fix --- Gruntfile.js | 28 +++++------ deploy/Gruntfile.js | 11 ++--- pipeline/scripts/download-electron-mirror.js | 2 +- src/common/get-inner-text-from-jsx-element.ts | 4 +- .../frameCommunicators/frame-communicator.ts | 5 +- src/injected/visualization/svg-drawer.ts | 7 ++- src/reports/report-name-generator.ts | 5 +- .../common/scan-for-accessibility-issues.ts | 2 +- src/tests/electron/setup/global-setup.ts | 2 +- src/tests/electron/setup/global-teardown.ts | 2 +- src/tests/end-to-end/setup/global-setup.ts | 2 +- src/tests/end-to-end/setup/global-teardown.ts | 2 +- .../high-contrast-settings.test.tsx | 5 +- .../telemetry/telemetry-settings.test.tsx | 5 +- .../failure-instance-panel-control.test.tsx | 47 +++++++++++++++---- .../background/stores/base-store.test.ts | 2 +- .../tests/common/document-manipulator.test.ts | 5 +- .../tests/common/indexedDB/indexedDB.test.ts | 2 +- .../frame-communicator.test.ts | 6 +-- .../common/http-query-builder.test.ts | 5 +- .../issue-filing-option-choice-group.test.tsx | 5 +- .../github-issue-filing-service.test.tsx | 5 +- .../new-tab-link-confirmation-dialog.test.tsx | 20 ++++++-- .../custom-rules/custom-widget-check.test.ts | 2 +- .../unique-landmark-check.test.ts | 2 +- .../custom-rules/widget-function.test.ts | 2 +- .../content/markup/code-example.test.tsx | 7 ++- wallaby.conf.js | 2 +- 28 files changed, 134 insertions(+), 60 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index cc6101fa58b..6444c988751 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ const targets = require('./targets.config'); const merge = require('lodash/merge'); const yaml = require('js-yaml'); -module.exports = function (grunt) { +module.exports = function(grunt) { const extensionPath = 'extension'; const packageReportPath = path.join('package', 'report'); @@ -351,7 +351,7 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-exec'); grunt.loadNpmTasks('grunt-sass'); - grunt.registerMultiTask('embed-styles', function () { + grunt.registerMultiTask('embed-styles', function() { const { cssPath } = this.data; this.files.forEach(file => { const { @@ -373,7 +373,7 @@ module.exports = function (grunt) { }); }); - grunt.registerMultiTask('configure', function () { + grunt.registerMultiTask('configure', function() { const { config, configJSONPath, configJSPath, telemetryKeyIdentifier } = this.data; // We pass this as an option from a build variable not because it is a secret // (it can be found easily enough from released builds), but to make it harder @@ -390,7 +390,7 @@ module.exports = function (grunt) { grunt.file.write(configJSPath, configJS); }); - grunt.registerMultiTask('manifest', function () { + grunt.registerMultiTask('manifest', function() { const { config, manifestSrc, manifestDest } = this.data; const manifestJSON = grunt.file.readJSON(manifestSrc); merge(manifestJSON, { @@ -411,7 +411,7 @@ module.exports = function (grunt) { grunt.file.write(manifestDest, JSON.stringify(manifestJSON, undefined, 2)); }); - grunt.registerMultiTask('drop', function () { + grunt.registerMultiTask('drop', function() { const targetName = this.target; const { bundleFolder, mustExistFile, config } = targets[targetName]; @@ -432,7 +432,7 @@ module.exports = function (grunt) { console.log(`${targetName} extension is in ${dropExtensionPath}`); }); - grunt.registerMultiTask('configure-electron-builder', function () { + grunt.registerMultiTask('configure-electron-builder', function() { grunt.task.requires('drop:' + this.target); const { dropPath, electronIconBaseName, fullName, appId, publishUrl } = this.data; @@ -466,7 +466,7 @@ module.exports = function (grunt) { grunt.log.writeln(`generated ${outElectronBuilderConfigFile} from target config`); }); - grunt.registerMultiTask('electron-builder-pack', function () { + grunt.registerMultiTask('electron-builder-pack', function() { grunt.task.requires('drop:' + this.target); grunt.task.requires('configure-electron-builder:' + this.target); @@ -499,7 +499,7 @@ module.exports = function (grunt) { ); }); - grunt.registerMultiTask('zip-mac-folder', function () { + grunt.registerMultiTask('zip-mac-folder', function() { grunt.task.requires('drop:' + this.target); grunt.task.requires('configure-electron-builder:' + this.target); grunt.task.requires('electron-builder-pack:' + this.target); @@ -537,14 +537,14 @@ module.exports = function (grunt) { ); }); - grunt.registerMultiTask('unified-release-drop', function () { + grunt.registerMultiTask('unified-release-drop', function() { grunt.task.run(`drop:${this.target}`); grunt.task.run(`configure-electron-builder:${this.target}`); grunt.task.run(`electron-builder-pack:${this.target}`); grunt.task.run(`zip-mac-folder:${this.target}`); }); - grunt.registerTask('package-report', function () { + grunt.registerTask('package-report', function() { const mustExistPath = path.join(packageReportBundlePath, 'report.bundle.js'); mustExist(mustExistPath, 'Have you run webpack?'); @@ -555,7 +555,7 @@ module.exports = function (grunt) { console.log(`package is in ${packageReportDropPath}`); }); - grunt.registerTask('package-ui', function () { + grunt.registerTask('package-ui', function() { const mustExistPath = path.join(packageUIBundlePath, 'ui.bundle.js'); mustExist(mustExistPath, 'Have you run webpack?'); @@ -565,19 +565,19 @@ module.exports = function (grunt) { console.log(`package is in ${packageUIDropPath}`); }); - grunt.registerTask('extension-release-drops', function () { + grunt.registerTask('extension-release-drops', function() { extensionReleaseTargets.forEach(targetName => { grunt.task.run('drop:' + targetName); }); }); - grunt.registerTask('unified-release-drops', function () { + grunt.registerTask('unified-release-drops', function() { unifiedReleaseTargets.forEach(targetName => { grunt.task.run('unified-release-drop:' + targetName); }); }); - grunt.registerTask('ada-cat', function () { + grunt.registerTask('ada-cat', function() { if (process.env.SHOW_ADA !== 'false') { console.log( 'Image of Ada sleeping follows. Set environment variable SHOW_ADA to false to hide.', diff --git a/deploy/Gruntfile.js b/deploy/Gruntfile.js index ac1631f0d3e..3e1691e2db6 100644 --- a/deploy/Gruntfile.js +++ b/deploy/Gruntfile.js @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -module.exports = function (grunt) { +module.exports = function(grunt) { const webStoreAccount = { client_id: grunt.option('webstore-client-id'), client_secret: grunt.option('webstore-client-secret'), @@ -59,12 +59,11 @@ module.exports = function (grunt) { const makeVersionFromDateString = lastSeperator => { const now = new Date(); - return `${now.getUTCFullYear()}.${ - now.getUTCMonth() + 1 - }.${now.getUTCDate()}${lastSeperator}${now.getUTCHours() * 100 + now.getUTCMinutes()}`; + return `${now.getUTCFullYear()}.${now.getUTCMonth() + + 1}.${now.getUTCDate()}${lastSeperator}${now.getUTCHours() * 100 + now.getUTCMinutes()}`; }; - grunt.registerTask('update-config', function () { + grunt.registerTask('update-config', function() { const configJSONPath = 'product/insights.config.json'; const config = grunt.file.readJSON(configJSONPath); @@ -80,7 +79,7 @@ module.exports = function (grunt) { grunt.file.write(configJSPath, configJS); }); - grunt.registerTask('update-manifest', function () { + grunt.registerTask('update-manifest', function() { const manifestPath = 'product/manifest.json'; const manifest = grunt.file.readJSON(manifestPath); let version = options.extensionVersion; diff --git a/pipeline/scripts/download-electron-mirror.js b/pipeline/scripts/download-electron-mirror.js index d131c37bb37..30bb16c8abc 100644 --- a/pipeline/scripts/download-electron-mirror.js +++ b/pipeline/scripts/download-electron-mirror.js @@ -10,7 +10,7 @@ download( version: pkg.devDependencies.electron, cache: 'drop/zips', }, - function (err, zipPath) { + function(err, zipPath) { // zipPath will be the path of the zip that it downloaded. // If the zip was already cached it will skip // downloading and call the cb with the cached zip path. diff --git a/src/common/get-inner-text-from-jsx-element.ts b/src/common/get-inner-text-from-jsx-element.ts index 1682ef03784..e084e227e9c 100644 --- a/src/common/get-inner-text-from-jsx-element.ts +++ b/src/common/get-inner-text-from-jsx-element.ts @@ -1,7 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. export function getInnerTextFromJsxElement(element: JSX.Element): string { - return getInnerTextFromJsxElementRecursive(element).replace(/\s+/g, ' ').trim(); + return getInnerTextFromJsxElementRecursive(element) + .replace(/\s+/g, ' ') + .trim(); } function getInnerTextFromJsxElementRecursive(element: JSX.Element): string { diff --git a/src/injected/frameCommunicators/frame-communicator.ts b/src/injected/frameCommunicators/frame-communicator.ts index dc1ec8568cb..7fa6a869527 100644 --- a/src/injected/frameCommunicators/frame-communicator.ts +++ b/src/injected/frameCommunicators/frame-communicator.ts @@ -150,7 +150,10 @@ export class FrameCommunicator { private doesFrameSupportScripting(frame: HTMLIFrameElement): boolean { return ( !frame.hasAttribute('sandbox') || - frame.getAttribute('sandbox').toLocaleLowerCase().lastIndexOf('allow-scripts') >= 0 + frame + .getAttribute('sandbox') + .toLocaleLowerCase() + .lastIndexOf('allow-scripts') >= 0 ); } diff --git a/src/injected/visualization/svg-drawer.ts b/src/injected/visualization/svg-drawer.ts index b0700e113a5..fd4ce969809 100644 --- a/src/injected/visualization/svg-drawer.ts +++ b/src/injected/visualization/svg-drawer.ts @@ -296,7 +296,12 @@ export class SVGDrawer extends BaseDrawer { const result = chain(this.tabbedElements) .filter((element: TabbedItem) => element.shouldRedraw) - .map(tabbed => chain(tabbed.focusIndicator).values().compact().value()) + .map(tabbed => + chain(tabbed.focusIndicator) + .values() + .compact() + .value(), + ) .flatten() .value(); diff --git a/src/reports/report-name-generator.ts b/src/reports/report-name-generator.ts index 7c5b1dcf47b..b5902f48ee1 100644 --- a/src/reports/report-name-generator.ts +++ b/src/reports/report-name-generator.ts @@ -27,7 +27,10 @@ export class ReportNameGenerator { } private getTitleSegment(pageTitle: string): string { - return Array.from(pageTitle).filter(this.isValidCharForTitle).slice(0, 20).join(''); + return Array.from(pageTitle) + .filter(this.isValidCharForTitle) + .slice(0, 20) + .join(''); } private isValidCharForTitle(character: string): boolean { diff --git a/src/tests/electron/common/scan-for-accessibility-issues.ts b/src/tests/electron/common/scan-for-accessibility-issues.ts index 01ddb1d8579..9d6e10fb634 100644 --- a/src/tests/electron/common/scan-for-accessibility-issues.ts +++ b/src/tests/electron/common/scan-for-accessibility-issues.ts @@ -27,7 +27,7 @@ export async function scanForAccessibilityIssues( const elementContext = selectorInEvaluate === null ? document : { include: [selectorInEvaluate] }; - axe.run(elementContext, options, function (err: Error, results: any): void { + axe.run(elementContext, options, function(err: Error, results: any): void { if (err) { throw err; } diff --git a/src/tests/electron/setup/global-setup.ts b/src/tests/electron/setup/global-setup.ts index 18f23e5eb73..18b60b5bc88 100644 --- a/src/tests/electron/setup/global-setup.ts +++ b/src/tests/electron/setup/global-setup.ts @@ -4,6 +4,6 @@ import * as testResourceServer from '../../miscellaneous/test-resource-server/re import { testResourceServerConfig } from './test-resource-server-config'; // tslint:disable-next-line:no-default-export -export default function (): void { +export default function(): void { testResourceServer.startServer(testResourceServerConfig); } diff --git a/src/tests/electron/setup/global-teardown.ts b/src/tests/electron/setup/global-teardown.ts index a863f35dc0b..1c99cc976d7 100644 --- a/src/tests/electron/setup/global-teardown.ts +++ b/src/tests/electron/setup/global-teardown.ts @@ -3,6 +3,6 @@ import * as testResourceServer from '../../miscellaneous/test-resource-server/resource-server'; // tslint:disable-next-line:no-default-export -export default function (): void { +export default function(): void { testResourceServer.stopAllServers(); } diff --git a/src/tests/end-to-end/setup/global-setup.ts b/src/tests/end-to-end/setup/global-setup.ts index 18f23e5eb73..18b60b5bc88 100644 --- a/src/tests/end-to-end/setup/global-setup.ts +++ b/src/tests/end-to-end/setup/global-setup.ts @@ -4,6 +4,6 @@ import * as testResourceServer from '../../miscellaneous/test-resource-server/re import { testResourceServerConfig } from './test-resource-server-config'; // tslint:disable-next-line:no-default-export -export default function (): void { +export default function(): void { testResourceServer.startServer(testResourceServerConfig); } diff --git a/src/tests/end-to-end/setup/global-teardown.ts b/src/tests/end-to-end/setup/global-teardown.ts index a863f35dc0b..1c99cc976d7 100644 --- a/src/tests/end-to-end/setup/global-teardown.ts +++ b/src/tests/end-to-end/setup/global-teardown.ts @@ -3,6 +3,6 @@ import * as testResourceServer from '../../miscellaneous/test-resource-server/resource-server'; // tslint:disable-next-line:no-default-export -export default function (): void { +export default function(): void { testResourceServer.stopAllServers(); } diff --git a/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/high-contrast/high-contrast-settings.test.tsx b/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/high-contrast/high-contrast-settings.test.tsx index c3a2822c1f4..ea5d81cac88 100644 --- a/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/high-contrast/high-contrast-settings.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/high-contrast/high-contrast-settings.test.tsx @@ -51,7 +51,10 @@ describe('HighContrastSettings', () => { .setup(creator => creator.setHighContrastMode(!enabled)) .verifiable(Times.once()); - wrapper.dive().find(Toggle).simulate('click'); + wrapper + .dive() + .find(Toggle) + .simulate('click'); userConfigMessageCreatorMock.verifyAll(); }); diff --git a/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/telemetry/telemetry-settings.test.tsx b/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/telemetry/telemetry-settings.test.tsx index 4ae9e8fd0ab..9ad800abd2d 100644 --- a/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/telemetry/telemetry-settings.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/details-view-overlay/settings-panel/settings/telemetry/telemetry-settings.test.tsx @@ -64,7 +64,10 @@ describe('TelemetrySettings', () => { .setup(creator => creator.setTelemetryState(!enabled)) .verifiable(Times.once()); - wrapper.dive().find(Toggle).simulate('click'); + wrapper + .dive() + .find(Toggle) + .simulate('click'); userConfigMessageCreatorMock.verifyAll(); }); diff --git a/src/tests/unit/tests/DetailsView/components/failure-instance-panel-control.test.tsx b/src/tests/unit/tests/DetailsView/components/failure-instance-panel-control.test.tsx index c94afb6bbda..17a2e7c904c 100644 --- a/src/tests/unit/tests/DetailsView/components/failure-instance-panel-control.test.tsx +++ b/src/tests/unit/tests/DetailsView/components/failure-instance-panel-control.test.tsx @@ -70,7 +70,10 @@ describe('FailureInstancePanelControlTest', () => { const wrapper = shallow( , ); - wrapper.find(TextField).props().onChange(null, description); + wrapper + .find(TextField) + .props() + .onChange(null, description); expect(wrapper.state().currentInstance.failureDescription).toEqual(description); }); @@ -132,8 +135,14 @@ describe('FailureInstancePanelControlTest', () => { const wrapper = shallow( , ); - wrapper.find(TextField).props().onChange(eventStub, 'a previously entered description'); - wrapper.find(ActionButton).props().onClick(eventStub); + wrapper + .find(TextField) + .props() + .onChange(eventStub, 'a previously entered description'); + wrapper + .find(ActionButton) + .props() + .onClick(eventStub); expect(wrapper.state().isPanelOpen).toBe(true); expect(wrapper.state().currentInstance.failureDescription).toEqual( @@ -150,9 +159,15 @@ describe('FailureInstancePanelControlTest', () => { , ); - wrapper.find(TextField).props().onChange(null, description); + wrapper + .find(TextField) + .props() + .onChange(null, description); - wrapper.find(GenericPanel).props().onDismiss(); + wrapper + .find(GenericPanel) + .props() + .onDismiss(); expect(wrapper.state().isPanelOpen).toBe(false); @@ -182,9 +197,15 @@ describe('FailureInstancePanelControlTest', () => { , ); - wrapper.find(TextField).props().onChange(null, description); + wrapper + .find(TextField) + .props() + .onChange(null, description); - wrapper.find(ActionAndCancelButtonsComponent).props().primaryButtonOnClick(null); + wrapper + .find(ActionAndCancelButtonsComponent) + .props() + .primaryButtonOnClick(null); expect(wrapper.state().isPanelOpen).toBe(false); @@ -212,9 +233,15 @@ describe('FailureInstancePanelControlTest', () => { const wrapper = shallow( , ); - wrapper.find(TextField).props().onChange(null, description); - - wrapper.find(ActionAndCancelButtonsComponent).props().primaryButtonOnClick(null); + wrapper + .find(TextField) + .props() + .onChange(null, description); + + wrapper + .find(ActionAndCancelButtonsComponent) + .props() + .primaryButtonOnClick(null); expect(wrapper.state().isPanelOpen).toBe(false); diff --git a/src/tests/unit/tests/background/stores/base-store.test.ts b/src/tests/unit/tests/background/stores/base-store.test.ts index 82f52efc138..352ba2e0d0f 100644 --- a/src/tests/unit/tests/background/stores/base-store.test.ts +++ b/src/tests/unit/tests/background/stores/base-store.test.ts @@ -49,7 +49,7 @@ describe('BaseStoreTest', () => { const changedListener = Mock.ofInstance((testStore: TestStore, args: any) => {}, MockBehavior.Strict); - const listenerAdder = function (): void { + const listenerAdder = function(): void { // hack to access onGetCurrentState from the BaseStore class // tslint:disable-next-line:no-invalid-this this.onGetCurrentState(); diff --git a/src/tests/unit/tests/common/document-manipulator.test.ts b/src/tests/unit/tests/common/document-manipulator.test.ts index 129f091aae1..0581780166e 100644 --- a/src/tests/unit/tests/common/document-manipulator.test.ts +++ b/src/tests/unit/tests/common/document-manipulator.test.ts @@ -16,7 +16,10 @@ describe('DocumentManipulator', () => { setter.setShortcutIcon(expectedHref); - const actualHref = document.querySelector('link').getAttribute('href').valueOf(); + const actualHref = document + .querySelector('link') + .getAttribute('href') + .valueOf(); expect(actualHref).toEqual(expectedHref); }); diff --git a/src/tests/unit/tests/common/indexedDB/indexedDB.test.ts b/src/tests/unit/tests/common/indexedDB/indexedDB.test.ts index 6918491f287..c77571704df 100644 --- a/src/tests/unit/tests/common/indexedDB/indexedDB.test.ts +++ b/src/tests/unit/tests/common/indexedDB/indexedDB.test.ts @@ -11,7 +11,7 @@ describe('IndexedDBUtil test cases', () => { let store; beforeAll(() => { const request = fakeIndexedDB.open(defaultDBName, 3); - request.onupgradeneeded = function (): void { + request.onupgradeneeded = function(): void { const db = request.result; store = db.createObjectStore(defaultStoreName); }; diff --git a/src/tests/unit/tests/injected/frameCommunicators/frame-communicator.test.ts b/src/tests/unit/tests/injected/frameCommunicators/frame-communicator.test.ts index c05f831d825..9691d61dd74 100644 --- a/src/tests/unit/tests/injected/frameCommunicators/frame-communicator.test.ts +++ b/src/tests/unit/tests/injected/frameCommunicators/frame-communicator.test.ts @@ -135,9 +135,9 @@ describe('FrameCommunicatorTests', () => { test('verifyDisposeInIframe', () => { let disposeCallback: Function; const frameRequests: MessageRequest[] = []; - const frameRequestCompleteDeferred: Q.Deferred< - Q.PromiseState[] - > = Q.defer[]>(); + const frameRequestCompleteDeferred: Q.Deferred[]> = Q.defer[]>(); mockWindowMessageHandler .setup(x => x.addSubscriber(FrameCommunicator.DisposeCommand, It.isAny())) diff --git a/src/tests/unit/tests/issue-filing/common/http-query-builder.test.ts b/src/tests/unit/tests/issue-filing/common/http-query-builder.test.ts index b60d2ca8ddf..e2196e2f8a6 100644 --- a/src/tests/unit/tests/issue-filing/common/http-query-builder.test.ts +++ b/src/tests/unit/tests/issue-filing/common/http-query-builder.test.ts @@ -75,7 +75,10 @@ describe('HTTPQueryBuilder', () => { ]; it.each(testCases)('of length %s', (name, actual, expected) => { - const result = testSubject.withBaseUrl('').withParam('a', actual).build(); + const result = testSubject + .withBaseUrl('') + .withParam('a', actual) + .build(); expect(result).toEqual('?a=' + expected); }); diff --git a/src/tests/unit/tests/issue-filing/components/issue-filing-option-choice-group.test.tsx b/src/tests/unit/tests/issue-filing/components/issue-filing-option-choice-group.test.tsx index 84ac115f5b9..1aecec2ca94 100644 --- a/src/tests/unit/tests/issue-filing/components/issue-filing-option-choice-group.test.tsx +++ b/src/tests/unit/tests/issue-filing/components/issue-filing-option-choice-group.test.tsx @@ -56,7 +56,10 @@ describe('IssueFilingChoiceGroupTest', () => { onServiceChangeMock.setup(u => u(payload)).verifiable(Times.once()); const wrapper = shallow(); - wrapper.find(ChoiceGroup).props().onChange(null, testOption); + wrapper + .find(ChoiceGroup) + .props() + .onChange(null, testOption); onServiceChangeMock.verifyAll(); }); }); diff --git a/src/tests/unit/tests/issue-filing/services/github/github-issue-filing-service.test.tsx b/src/tests/unit/tests/issue-filing/services/github/github-issue-filing-service.test.tsx index cb18e4099da..af6e63a3d84 100644 --- a/src/tests/unit/tests/issue-filing/services/github/github-issue-filing-service.test.tsx +++ b/src/tests/unit/tests/issue-filing/services/github/github-issue-filing-service.test.tsx @@ -102,7 +102,10 @@ describe('GithubIssueFilingServiceTest', () => { onPropertyUpdateCallbackMock .setup(updateCallback => updateCallback(It.isValue(payload))) .verifiable(Times.once()); - wrapper.find(TextField).props().onChange(null, newRepositoryValue); + wrapper + .find(TextField) + .props() + .onChange(null, newRepositoryValue); onPropertyUpdateCallbackMock.verifyAll(); }); }); diff --git a/src/tests/unit/tests/reports/components/new-tab-link-confirmation-dialog.test.tsx b/src/tests/unit/tests/reports/components/new-tab-link-confirmation-dialog.test.tsx index 321e259b6e5..4865a98de77 100644 --- a/src/tests/unit/tests/reports/components/new-tab-link-confirmation-dialog.test.tsx +++ b/src/tests/unit/tests/reports/components/new-tab-link-confirmation-dialog.test.tsx @@ -78,7 +78,10 @@ describe('NewTabLinkWithConfirmationDialog', () => { .returns(() => targetPageLinkMock.object) .verifiable(Times.once()); - const generatedScript = testSubject.find('script').render().html(); + const generatedScript = testSubject + .find('script') + .render() + .html(); // tslint:disable-next-line: no-eval eval(generatedScript); @@ -107,7 +110,10 @@ describe('NewTabLinkWithConfirmationDialog', () => { const testSubject = shallow(); - const generatedScript = testSubject.find('script').render().html(); + const generatedScript = testSubject + .find('script') + .render() + .html(); // tslint:disable-next-line: no-eval eval(generatedScript); @@ -134,7 +140,10 @@ describe('NewTabLinkWithConfirmationDialog', () => { const testSubject = shallow(); - const generatedScript = testSubject.find('script').render().html(); + const generatedScript = testSubject + .find('script') + .render() + .html(); // tslint:disable-next-line: no-eval eval(generatedScript); @@ -161,7 +170,10 @@ describe('NewTabLinkWithConfirmationDialog', () => { const testSubject = shallow(); - const generatedScript = testSubject.find('script').render().html(); + const generatedScript = testSubject + .find('script') + .render() + .html(); // tslint:disable-next-line: no-eval eval(generatedScript); diff --git a/src/tests/unit/tests/scanner/custom-rules/custom-widget-check.test.ts b/src/tests/unit/tests/scanner/custom-rules/custom-widget-check.test.ts index 0d79c8c09b7..cae80726d15 100644 --- a/src/tests/unit/tests/scanner/custom-rules/custom-widget-check.test.ts +++ b/src/tests/unit/tests/scanner/custom-rules/custom-widget-check.test.ts @@ -12,7 +12,7 @@ const fixture = createTestFixture('test-fixture', ''); const context = { _data: null, - data: function (d: any): any { + data: function(d: any): any { // tslint:disable-next-line:no-invalid-this this._data = d; }, diff --git a/src/tests/unit/tests/scanner/custom-rules/unique-landmark-check.test.ts b/src/tests/unit/tests/scanner/custom-rules/unique-landmark-check.test.ts index c5d86b8233a..1ba838d2230 100644 --- a/src/tests/unit/tests/scanner/custom-rules/unique-landmark-check.test.ts +++ b/src/tests/unit/tests/scanner/custom-rules/unique-landmark-check.test.ts @@ -11,7 +11,7 @@ describe('axe.Check: unique-landmark', () => { let fixture; const checkContext = { _data: null, - data: function (d: any): void { + data: function(d: any): void { // tslint:disable-next-line:no-invalid-this this._data = d; }, diff --git a/src/tests/unit/tests/scanner/custom-rules/widget-function.test.ts b/src/tests/unit/tests/scanner/custom-rules/widget-function.test.ts index fd9dcdbdb1e..1c5647c6185 100644 --- a/src/tests/unit/tests/scanner/custom-rules/widget-function.test.ts +++ b/src/tests/unit/tests/scanner/custom-rules/widget-function.test.ts @@ -114,7 +114,7 @@ describe('verify widget function data', () => { const context = { _data: null, - data: function (d): void { + data: function(d): void { // tslint:disable-next-line:no-invalid-this this._data = d; }, diff --git a/src/tests/unit/tests/views/content/markup/code-example.test.tsx b/src/tests/unit/tests/views/content/markup/code-example.test.tsx index 2b7d88a138b..4258aad6e6d 100644 --- a/src/tests/unit/tests/views/content/markup/code-example.test.tsx +++ b/src/tests/unit/tests/views/content/markup/code-example.test.tsx @@ -73,6 +73,11 @@ describe('', () => { it('br has the correct key', () => { const wrapper = shallow({`Line 1\nLine 2`}); - expect(wrapper.find('br').at(0).key()).toEqual(`line-breaker-1`); + expect( + wrapper + .find('br') + .at(0) + .key(), + ).toEqual(`line-breaker-1`); }); }); diff --git a/wallaby.conf.js b/wallaby.conf.js index d4efcbae3a0..0ab215ab6ac 100644 --- a/wallaby.conf.js +++ b/wallaby.conf.js @@ -26,7 +26,7 @@ module.exports = wallaby => { '**/*.+(ts|tsx)': wallaby.compilers.typeScript({ module: 'commonjs' }), }, testFramework: 'jest', - setup: function (wallaby) { + setup: function(wallaby) { const jestConfig = require('./src/tests/unit/jest.config.js'); // Wallaby uses its own typescript transformer and recommends disabling jest's to avoid double-compiling.