Skip to content

Commit 76c4ed0

Browse files
authored
Fix types (#194)
* run a typecheck as part of linting * fix test issues
1 parent 03cbce6 commit 76c4ed0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515
"scripts": {
1616
"build": "tsc",
17-
"lint": "eslint src/**/*.ts",
17+
"lint:types": "tsc --noEmit",
18+
"lint": "eslint src/**/*.ts && npm run lint:types",
1819
"format": "npm run lint -- --fix",
1920
"test": "npm run format && web-test-runner",
2021
"test:watch": "npm run format && web-test-runner --watch",

tests/label-content-name-mismatch.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ describe("label-content-name-mismatch", function () {
9797
<button aria-labelledby="label1">Find</button>
9898
</div>`,
9999
);
100-
const button = container.querySelector('button');
101-
const results = await scanner.scan(button);
100+
const results = await scanner.scan(container);
102101

103102
expect(results).to.have.lengthOf(1);
104103
});
@@ -110,8 +109,7 @@ describe("label-content-name-mismatch", function () {
110109
<button aria-labelledby="label2">Find</button>
111110
</div>`,
112111
);
113-
const button = container.querySelector('button');
114-
const results = await scanner.scan(button);
112+
const results = await scanner.scan(container);
115113

116114
expect(results).to.be.empty;
117115
});

0 commit comments

Comments
 (0)