Skip to content

Commit 8e4aa43

Browse files
committed
Fix tests
1 parent 8b79057 commit 8e4aa43

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class HyperResponsiveTable extends Component {
7171
const { breakpoint } = props;
7272
if (matchMedia) {
7373
mql = window.matchMedia(typeof breakpoint === 'string' ? breakpoint : `screen and (min-width: ${breakpoint}px)`);
74-
mql.addEventListener('change', this.handleMatch);
74+
mql.addListener(this.handleMatch);
7575
narrow = !mql.matches;
7676
}
7777

tests/index-test.js renamed to src/index.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
/* eslint-env browser, mocha */
2+
13
import expect from 'expect';
24
import React from 'react';
35
import { render, unmountComponentAtNode } from 'react-dom';
46
import matchMediaMock from 'match-media-mock';
57

6-
import Component from '../src';
8+
import Component from './index';
79

810
const matchMedia = matchMediaMock.create();
911
window.matchMedia = matchMedia;

tests/.eslintrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)