-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds documentation and help comments
- Loading branch information
drewlee
committed
Jun 17, 2021
1 parent
0e524f4
commit 41d61ed
Showing
6 changed files
with
44 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ENABLE_A11Y_MIDDLEWARE_REPORTER } from './cli-options'; | ||
|
||
/** | ||
* Utility to determine whether to use the middleware reporter. This functionality is | ||
* enabled by the presence of the `enableA11yMiddlewareReporter` query parameter passed | ||
* to the test suite or the `ENABLE_A11Y_MIDDLEWARE_REPORTER` environmental variable. | ||
*/ | ||
export function useMiddlewareReporter() { | ||
const url = new URL(window.location.href, document.baseURI); | ||
|
||
return ( | ||
ENABLE_A11Y_MIDDLEWARE_REPORTER || | ||
url.searchParams.get('enableA11yMiddlewareReporter') !== null | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters