Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
update react-a11y-titles tests to use array literals
Browse files Browse the repository at this point in the history
  • Loading branch information
drexler committed Mar 12, 2019
1 parent 95231e1 commit 499a430
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tests/ReactA11yTitlesRuleTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ describe('reactA11yTitlesRule', (): void => {
});

it('should fail on longer than 60 charactes title', (): void => {
const title: string = Array(61).join('a');
const testTitle: string[] = [];
testTitle.length = 60;
const title: string = testTitle.fill('a').join('');
const script: string = `
import React = require('react');
Expand All @@ -70,7 +72,9 @@ describe('reactA11yTitlesRule', (): void => {
});

it('should pass on shorter than 60 characters title', (): void => {
const title: string = Array(5).join('a');
const testTitle: string[] = [];
testTitle.length = 5;
const title: string = testTitle.fill('a').join('');
const script: string = `
import React = require('react');
Expand Down

0 comments on commit 499a430

Please sign in to comment.