Skip to content

Commit

Permalink
style(format): remove unicode chars in a11y err msg
Browse files Browse the repository at this point in the history
to check if it fixes #14
  • Loading branch information
Mohan Raj Rajamanickam committed May 29, 2020
1 parent 58f0459 commit dfc39c1
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 76 deletions.
64 changes: 32 additions & 32 deletions packages/assert/__tests__/__snapshots__/assert.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions packages/format/__tests__/__snapshots__/format.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/format/src/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import { Result } from 'axe-core';
import { printReceived } from 'jest-matcher-utils';

const a11yViolationIndicator = '';
const helpUrlIndicator = '🔗';
const a11yViolationIndicator = '*';
const helpUrlIndicator = '-';

/**
* Formatter defines the function signature to format accessibility violations found by axe
Expand All @@ -20,9 +20,9 @@ export interface Formatter {

/**
* Get num of a11y issues from a11y violations error object
* @param a11yViolations
* @param a11yViolations - error thrown from `@sa11y/assert` containing a11y violations
*/
export function getNumIssues(a11yViolations: string) {
export function getNumIssues(a11yViolations: string): number {
// TODO (Refactor): Operate on Result[] instead of the error object
// TODO (Refactor): Construct a custom error object for a11y violations
return a11yViolations.toString().split(a11yViolationIndicator).length - 1;
Expand Down
Loading

0 comments on commit dfc39c1

Please sign in to comment.