Skip to content

Commit

Permalink
fix: use normal function instead arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Oct 5, 2019
1 parent d21f42a commit e3a28cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

const assertLength = length =>
function $assertLength(selector) {
function assertLength(length) {
return function $assertLength(selector) {
let result = this.find(selector);
expect(
result,
Expand All @@ -16,6 +16,7 @@ const assertLength = length =>
).to.have.length(length);
return result;
};
}

ReactWrapper.prototype.assertSingle = assertLength(1);
ShallowWrapper.prototype.assertSingle = assertLength(1);
Expand Down

0 comments on commit e3a28cb

Please sign in to comment.