Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
emplums committed Jun 29, 2017
1 parent ac8e278 commit 85b99d1
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Button/test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { mount } from 'enzyme';
import ButtonStateless from '../ButtonStateless';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Button from './index';

describe('Button', () => {
Expand Down
2 changes: 1 addition & 1 deletion Card/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Card from './index';

describe('Card', () => {
Expand Down
2 changes: 1 addition & 1 deletion Icon/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import ArrowLeftIcon from './Icons/ArrowLeftIcon';

describe('Icon', () => {
Expand Down
2 changes: 1 addition & 1 deletion IdTag/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import IdTag from './index';

describe('IdTag', () => {
Expand Down
2 changes: 1 addition & 1 deletion Image/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Image from './index';

describe('Image', () => {
Expand Down
1 change: 0 additions & 1 deletion InputDate/test.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { mount } from 'enzyme';
import { testComponentA11y } from '../lib/a11yTestHelper';
import InputDate from './index';

describe('InputDate', () => {
Expand Down
11 changes: 0 additions & 11 deletions InputTime/test.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
import React from 'react';
import { mount } from 'enzyme';
import { testComponentA11y } from '../lib/a11yTestHelper';
import InputTime from './index';

describe('InputTime', () => {
it('should pass accessibility audit', () => {
const onChange = jest.fn();
return testComponentA11y(<InputTime
input={{
onChange,
}}
/>,
)
.then(results => expect(results.violations.length).toBe(0));
});
it('should trigger onChange when hour is selected', () => {
const onChange = jest.fn();
const wrapper = mount(
Expand Down
2 changes: 1 addition & 1 deletion Link/test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { mount } from 'enzyme';
import LinkStateless from '../LinkStateless';
import Link from './index';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';

describe('Link', () => {
it('should pass accessibility audit', () => testComponentA11y(
Expand Down
2 changes: 1 addition & 1 deletion LinkStateless/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import LinkStateless from './index';

describe('LinkStateless', () => {
Expand Down
2 changes: 1 addition & 1 deletion LinkifiedText/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import LinkifiedText from './index';

describe('LinkifiedText', () => {
Expand Down
2 changes: 1 addition & 1 deletion List/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import List from './index';

describe('List', () => {
Expand Down
2 changes: 1 addition & 1 deletion Loader/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Loader from './index';

describe('Loader', () => {
Expand Down
2 changes: 1 addition & 1 deletion MultipleImages/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import MultipleImages from './index';

describe('MultipleImages', () => {
Expand Down
2 changes: 1 addition & 1 deletion NavBar/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import NavBar from './index';

describe('NavBar', () => {
Expand Down
2 changes: 1 addition & 1 deletion Overlay/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Overlay from './index';
import Image from '../Image/index';

Expand Down
2 changes: 1 addition & 1 deletion Popover/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Popover from './index';
import Card from '../Card/index';

Expand Down
2 changes: 1 addition & 1 deletion SectionHeader/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import SectionHeader from './index';

describe('SectionHeader', () => {
Expand Down
2 changes: 1 addition & 1 deletion Select/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Select from './index';

describe('Select', () => {
Expand Down
2 changes: 1 addition & 1 deletion Video/test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { testComponentA11y } from '../lib/a11yTestHelper';
import testComponentA11y from '../lib/a11yTestHelper';
import Video from './index';

describe('Video', () => {
Expand Down
15 changes: 3 additions & 12 deletions lib/a11yTestHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ const report = (results) => {
}
};

/**
* Run an aXe audit.
* @private
*
* @param {object} node - A node reference from your app.
* @param {object} config - An aXe config or empty object.
*/
const a11yCheck = (node, config) => {

};

/**
* Test a component with Enzyme.
*
Expand All @@ -43,7 +32,7 @@ const a11yCheck = (node, config) => {
* [axe.a11yCheck](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#options-parameter).
* @param {function} callback - A callback function to execute when aXe returns.
*/
export const testComponentA11y = (app, config = []) => {
const testComponentA11y = (app, config = []) => {
const div = document.createElement('div'); //eslint-disable-line
document.body.appendChild(div); //eslint-disable-line

Expand All @@ -64,3 +53,5 @@ export const testComponentA11y = (app, config = []) => {
});
});
};

export default testComponentA11y;

0 comments on commit 85b99d1

Please sign in to comment.