Skip to content

Commit 7b9cfc9

Browse files
committed
fix typescript context for integration tests
1 parent d59a498 commit 7b9cfc9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import { module, test } from 'qunit';
22
import { setupRenderingTest } from 'ember-qunit';
33
import { render } from '@ember/test-helpers';
4+
import type { TestContext } from '@ember/test-helpers';
45
import hbs from 'htmlbars-inline-precompile';
56
import { a11yAudit, setEnableA11yAudit } from 'ember-a11y-testing/test-support';
67

8+
interface Context extends TestContext {
9+
element: Element;
10+
}
11+
712
module('Integration | Helper | a11yAudit', function (hooks) {
813
setupRenderingTest(hooks);
914

@@ -15,13 +20,13 @@ module('Integration | Helper | a11yAudit', function (hooks) {
1520
setEnableA11yAudit(false);
1621
});
1722

18-
test('a11yAudit runs successfully with element context', async function (assert) {
23+
test('a11yAudit runs successfully with element context', async function (this: Context, assert) {
1924
await render(hbs`<AxeComponent/>`);
2025
await a11yAudit(this.element);
2126
assert.ok(true, "a11yAudit ran and didn't find any issues");
2227
});
2328

24-
test('a11yAudit catches violations successfully', async function (assert) {
29+
test('a11yAudit catches violations successfully', async function (this: Context, assert) {
2530
await render(
2631
hbs`<AxeComponent><button type="button"></button></AxeComponent>`
2732
);
@@ -33,7 +38,7 @@ module('Integration | Helper | a11yAudit', function (hooks) {
3338
);
3439
});
3540

36-
test('a11yAudit can use custom axe options', async function (assert) {
41+
test('a11yAudit can use custom axe options', async function (this: Context, assert) {
3742
await render(
3843
hbs`<AxeComponent><button type="button"></button></AxeComponent>`
3944
);

0 commit comments

Comments
 (0)