Skip to content

Commit a7213fc

Browse files
committed
fixup! feat(cdk-experimental/radio): create radio group and button directives
1 parent bed01b1 commit a7213fc

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/cdk-experimental/radio/radio.spec.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ const colors = {
1818
};
1919

2020
// TODO: Move this to a separate folder/file so it can be reused across components.
21-
async function getAccessibilityViolationsReport(root: HTMLElement): Promise<string | null> {
21+
async function runAccessibilityChecks(root: HTMLElement): Promise<void> {
2222
const results = await axe.run(root);
2323

2424
if (!results.violations.length) {
25-
return null;
25+
return;
2626
}
2727

2828
const reportLines: string[] = [];
@@ -74,7 +74,7 @@ async function getAccessibilityViolationsReport(root: HTMLElement): Promise<stri
7474
}
7575
});
7676

77-
return reportLines.join('\n');
77+
fail(reportLines.join('\n'));
7878
}
7979

8080
describe('CdkRadioGroup', () => {
@@ -178,11 +178,7 @@ describe('CdkRadioGroup', () => {
178178
}
179179

180180
afterEach(async () => {
181-
const report = await getAccessibilityViolationsReport(radioGroupElement);
182-
183-
if (report) {
184-
fail(report);
185-
}
181+
await runAccessibilityChecks(radioGroupElement);
186182
});
187183

188184
describe('ARIA attributes and roles', () => {

0 commit comments

Comments
 (0)