Skip to content

Commit b83c33d

Browse files
committed
Run prettier fixer on all files.
1 parent 5b25508 commit b83c33d

17 files changed

+37
-37
lines changed

addon-test-support/audit.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function _isContext(potential: MaybeElementContext) {
4545
*/
4646
export function _normalizeRunParams(
4747
elementContext?: MaybeElementContext,
48-
runOptions?: RunOptions | undefined
48+
runOptions?: RunOptions | undefined,
4949
): [ElementContext, RunOptions] {
5050
let context: ElementContext;
5151
let options: RunOptions | undefined;
@@ -75,7 +75,7 @@ export function _normalizeRunParams(
7575
*/
7676
export default function a11yAudit(
7777
contextSelector: MaybeElementContext = '#ember-testing-container',
78-
axeOptions?: RunOptions | undefined
78+
axeOptions?: RunOptions | undefined,
7979
): PromiseLike<void> {
8080
mark('a11y_audit_start');
8181

addon-test-support/format-violation.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import type { Result } from 'axe-core';
88
*/
99
export default function formatViolation(
1010
violation: Partial<Result>,
11-
markup: string[]
11+
markup: string[],
1212
) {
1313
if (!violation.impact || !violation.help || !violation.helpUrl) {
1414
throw new Error(
15-
'formatViolation called with improper structure of parameter: violation. Required properties: impact, help, helpUrl.'
15+
'formatViolation called with improper structure of parameter: violation. Required properties: impact, help, helpUrl.',
1616
);
1717
}
1818

addon-test-support/logger.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function deduplicateViolations(results: AxeResults) {
7878
*/
7979
function logElement(
8080
node: NodeResult | RelatedNode,
81-
logFn: (...args: any[]) => void
81+
logFn: (...args: any[]) => void,
8282
): void {
8383
const el = document.querySelector(node.target.toString());
8484
if (!el) {
@@ -109,7 +109,7 @@ function logFailureMessage(node: NodeResult, key: AxeCoreNodeResultKey): void {
109109
const message: string = (
110110
axeCore as unknown as AxeWithAudit
111111
)._audit.data.failureSummaries[key].failureMessage(
112-
node[key].map((check) => check.message || '')
112+
node[key].map((check) => check.message || ''),
113113
);
114114

115115
console.error(message);
@@ -189,7 +189,7 @@ export function printResults() {
189189
result.impact,
190190
defaultReset,
191191
result.help,
192-
result.helpUrl
192+
result.helpUrl,
193193
);
194194
result.nodes.forEach((node) => {
195195
failureSummary(node, 'any');

addon-test-support/performance.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function measure(comment: string, startMark: string, endMark: string) {
3333
// eslint-disable-next-line no-console
3434
console.warn(
3535
'performance.measure could not be executed because of ',
36-
e.message
36+
e.message,
3737
);
3838
}
3939
}
@@ -48,7 +48,7 @@ export function measure(comment: string, startMark: string, endMark: string) {
4848
export function markEndAndMeasure(
4949
comment: string,
5050
startMark: string,
51-
endMark: string
51+
endMark: string,
5252
) {
5353
if (HAS_PERFORMANCE) {
5454
mark(endMark);

addon-test-support/reporter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const DEFAULT_REPORTER = async (results: AxeResults) => {
1919
let allViolationMessages = allViolations.join('\n');
2020
throw new Error(
2121
`The page should have no accessibility violations. Violations:\n${allViolationMessages}
22-
To rerun this specific failure, use the following query params: &testId=${QUnit.config.current.testId}&enableA11yAudit=true`
22+
To rerun this specific failure, use the following query params: &testId=${QUnit.config.current.testId}&enableA11yAudit=true`,
2323
);
2424
}
2525
};
@@ -37,7 +37,7 @@ export let reportA11yAudit: A11yAuditReporter = DEFAULT_REPORTER;
3737
* @param customReporter {A11yAuditReporter} The reporter to use in a11yAudit
3838
*/
3939
export function setCustomReporter(
40-
customReporter: A11yAuditReporter = DEFAULT_REPORTER
40+
customReporter: A11yAuditReporter = DEFAULT_REPORTER,
4141
) {
4242
reportA11yAudit = customReporter;
4343
}

addon-test-support/setup-global-a11y-hooks.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ export const DEFAULT_A11Y_TEST_HELPER_NAMES: HelperName[] = [
4343
export function setupGlobalA11yHooks(shouldAudit: InvocationStrategy): void;
4444
export function setupGlobalA11yHooks(
4545
shouldAudit: InvocationStrategy,
46-
audit: AuditFunction
46+
audit: AuditFunction,
4747
): void;
4848
export function setupGlobalA11yHooks(
4949
shouldAudit: InvocationStrategy,
50-
options: GlobalA11yHookOptions
50+
options: GlobalA11yHookOptions,
5151
): void;
5252
export function setupGlobalA11yHooks(
5353
shouldAudit: InvocationStrategy,
5454
audit: AuditFunction,
55-
options: GlobalA11yHookOptions
55+
options: GlobalA11yHookOptions,
5656
): void;
5757
export function setupGlobalA11yHooks(
5858
shouldAudit: InvocationStrategy,
5959
auditOrOptions?: AuditFunction | GlobalA11yHookOptions,
60-
options?: GlobalA11yHookOptions
60+
options?: GlobalA11yHookOptions,
6161
): void {
6262
let audit: AuditFunction = a11yAudit;
6363

addon-test-support/setup-middleware-reporter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export async function middlewareReporter(axeResults: AxeResults) {
8080
let { module, testName } = QUnit.config.current;
8181
if (!context) {
8282
throw new Error(
83-
'You tried to run ember-a11y-testing without calling one of the `setupTest` helpers from `@ember/test-helpers`. Please make sure your test setup calls `setupTest()`, `setupRenderingTest()`, or `setupApplicationTest()`!'
83+
'You tried to run ember-a11y-testing without calling one of the `setupTest` helpers from `@ember/test-helpers`. Please make sure your test setup calls `setupTest()`, `setupRenderingTest()`, or `setupApplicationTest()`!',
8484
);
8585
}
8686
let testMetaData = getTestMetadata(context);

addon-test-support/should-force-audit.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ENABLE_A11Y_AUDIT } from './cli-options';
33
export function _calculateUpdatedHref(
44
href: string,
55
baseURI: string,
6-
enabled: boolean = false
6+
enabled: boolean = false,
77
): string {
88
const url = new URL(href, baseURI);
99
const initialHref = url.href;
@@ -28,7 +28,7 @@ export function setEnableA11yAudit(enabled: boolean = false) {
2828
const href = _calculateUpdatedHref(
2929
window.location.href,
3030
document.baseURI,
31-
enabled
31+
enabled,
3232
);
3333

3434
// Update the URL without reloading

cli-options-filter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ class CliOptionsFilter extends Filter {
2323
if (enableMiddlewareReporter) {
2424
contents = contents.replace(
2525
/(ENABLE_A11Y_MIDDLEWARE_REPORTER = )false/,
26-
replacementToken
26+
replacementToken,
2727
);
2828
}
2929

3030
if (enableA11yAudit) {
3131
contents = contents.replace(
3232
/(ENABLE_A11Y_AUDIT = )false/,
33-
replacementToken
33+
replacementToken,
3434
);
3535
}
3636

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
~ALLOWED_CONTENT_FOR.indexOf(type)
6262
) {
6363
return fs.readFileSync(
64-
path.join(__dirname, 'content-for', type + '.html')
64+
path.join(__dirname, 'content-for', type + '.html'),
6565
);
6666
}
6767
},

node-tests/setup-middleware-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ QUnit.module('setupMiddleware', function (hooks) {
6767
}).then((res) => res.json());
6868

6969
assert.deepEqual(readJSONSync(json.outputPath), data);
70-
}
70+
},
7171
);
7272
});

tests/acceptance/a11y-audit-test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module('Acceptance | a11y audit', function (hooks) {
3131
await assert.rejects(
3232
<Promise<any>>a11yAudit(),
3333
/The page should have no accessibility violations. Violations:/,
34-
'error message is correct'
34+
'error message is correct',
3535
);
3636
});
3737

@@ -46,7 +46,7 @@ module('Acceptance | a11y audit', function (hooks) {
4646
await assert.rejects(
4747
<Promise<any>>a11yAudit(SELECTORS.failingComponent),
4848
/The page should have no accessibility violations. Violations:/,
49-
'error message is correct'
49+
'error message is correct',
5050
);
5151
});
5252

tests/acceptance/setup-global-a11y-hooks-test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ module('setupGlobalA11yHooks with invokeAll', function (hooks) {
6161
// eslint-disable-next-line qunit/no-conditional-assertions
6262
assert.strictEqual(
6363
actualAuditInvocationsCount,
64-
EXPECTED_AUDIT_INVOCATIONS_COUNT
64+
EXPECTED_AUDIT_INVOCATIONS_COUNT,
6565
);
6666
}
67-
}
67+
},
6868
);
6969
});
7070
});
@@ -116,10 +116,10 @@ module('setupGlobalA11yHooks with invokeEveryN', function (hooks) {
116116
// eslint-disable-next-line qunit/no-conditional-assertions
117117
assert.strictEqual(
118118
actualAuditInvocationsCount,
119-
EXPECTED_AUDIT_INVOCATIONS_COUNT
119+
EXPECTED_AUDIT_INVOCATIONS_COUNT,
120120
);
121121
}
122-
}
122+
},
123123
);
124124
});
125125
});
@@ -174,7 +174,7 @@ module('setupGlobalA11yHooks with invokeWithExclusions', function (hooks) {
174174
'IGNORE: test used to validate setupGlobalA11yHooks (5)',
175175
]);
176176
}
177-
}
177+
},
178178
);
179179
});
180180
});

tests/integration/components/setup-global-a11y-hooks-for-render-test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ module(
5050
assert.strictEqual(
5151
actualAuditInvocationsCount,
5252
2,
53-
'a11yAudit was automatically called twice'
53+
'a11yAudit was automatically called twice',
5454
);
5555
});
56-
}
56+
},
5757
);

tests/integration/helpers/a11y-audit-test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ module('Integration | Helper | a11yAudit', function (hooks) {
2828

2929
test('a11yAudit catches violations successfully', async function (this: Context, assert) {
3030
await render(
31-
hbs`<AxeComponent><button type="button"></button></AxeComponent>`
31+
hbs`<AxeComponent><button type="button"></button></AxeComponent>`,
3232
);
3333

3434
await assert.rejects(
3535
<Promise<any>>a11yAudit(this.element),
3636
/The page should have no accessibility violations. Violations:/,
37-
'error message is correct'
37+
'error message is correct',
3838
);
3939
});
4040

4141
test('a11yAudit can use custom axe options', async function (this: Context, assert) {
4242
await render(
43-
hbs`<AxeComponent><button type="button"></button></AxeComponent>`
43+
hbs`<AxeComponent><button type="button"></button></AxeComponent>`,
4444
);
4545

4646
await a11yAudit(this.element, {
@@ -56,7 +56,7 @@ module('Integration | Helper | a11yAudit', function (hooks) {
5656

5757
test('a11yAudit can use custom axe options as single argument', async function (assert) {
5858
await render(
59-
hbs`<AxeComponent><button type="button"></button></AxeComponent>`
59+
hbs`<AxeComponent><button type="button"></button></AxeComponent>`,
6060
);
6161

6262
await a11yAudit({

tests/unit/calculate-updated-href-test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module('Query parameter normalization', function (hooks) {
8585
assert.strictEqual(
8686
href,
8787
expectedHref,
88-
`_calculateUpdatedHref( ${url}, ${baseUrl}, ${enabled} ) -> ${href}`
88+
`_calculateUpdatedHref( ${url}, ${baseUrl}, ${enabled} ) -> ${href}`,
8989
);
9090
});
9191
});

types/ember-debug.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ declare module '@ember/debug' {
3030
* An optional url to the transition guide on the emberjs.com website.
3131
*/
3232
url?: string | undefined;
33-
}
33+
},
3434
): void;
3535
}

0 commit comments

Comments
 (0)