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

Commit 0d6722e

Browse files
committed
add a11y tests to input time
1 parent 5046e7a commit 0d6722e

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

InputDate/test.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
2-
import a11yTestHelper from "../lib/a11yTestHelper";
2+
import a11yTestHelper from '../lib/a11yTestHelper';
33
import { mount } from 'enzyme';
44
import InputDate from './index';
55

66
describe('InputDate', () => {
7-
it('should pass accessibility audit', done => {
7+
it('should pass accessibility audit', (done) => {
88
const onChange = jest.fn();
99
a11yTestHelper.testComponent(<InputDate
1010
input={{
@@ -15,7 +15,7 @@ describe('InputDate', () => {
1515
month: 21,
1616
year: 7,
1717
}}
18-
/>, function (results) {
18+
/>, [], (results) => {
1919
expect(results.violations.length).toBe(0);
2020
done();
2121
});

InputTime/test.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
import React from 'react';
22
import { mount } from 'enzyme';
3+
import a11yTestHelper from '../lib/a11yTestHelper';
34
import InputTime from './index';
45

56
describe('InputTime', () => {
7+
it('should pass accessibility audit', (done) => {
8+
const onChange = jest.fn();
9+
a11yTestHelper.testComponent(<InputTime
10+
input={{
11+
onChange,
12+
}}
13+
/>, [], (results) => {
14+
expect(results.violations.length).toBe(0);
15+
done();
16+
});
17+
});
618
it('should trigger onChange when hour is selected', () => {
719
const onChange = jest.fn();
820
const wrapper = mount(

0 commit comments

Comments
 (0)