File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/cdk-experimental/radio Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff 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
8080describe ( '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' , ( ) => {
You can’t perform that action at this time.
0 commit comments