Skip to content

Commit

Permalink
test(jest): unskip toBeWithinRange tests
Browse files Browse the repository at this point in the history
Jest's typings for variadic asymmetric matchers have now been corrected.

Closes #19
Refs DefinitelyTyped/DefinitelyTyped#22254
  • Loading branch information
JamieMason committed Nov 3, 2019
1 parent 1a2e377 commit 9aaedc1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/expect-more-jest/test/lib/member-assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const assertMemberComparisonMatcher = ({
expect(() => expect({ nested: { property: passReceived } }).not[name]('nested.property', passOther)).toThrow();
});

describe.skip('when Jest supports variadic asymmetric matchers', () => {
describe('when Jest supports variadic asymmetric matchers', () => {
it(`provides expect.${name}`, () => {
expect({ nested: { property: passReceived } }).toEqual(expect[name]('nested.property', passOther));
});
Expand Down
5 changes: 2 additions & 3 deletions packages/expect-more-jest/test/to-be-within-range.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// depends on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/22254
it('provides toBeWithinRange', () => {
expect(2).toBeWithinRange(1, 3);
expect(() => {
Expand All @@ -8,7 +7,7 @@ it('provides toBeWithinRange', () => {
expect(2).not.toBeWithinRange(1, 3);
}).toThrow();
});
// depends on https://github.com/DefinitelyTyped/DefinitelyTyped/pull/22254
it.skip('provides expect.toBeWithinRange', () => {

it('provides expect.toBeWithinRange', () => {
expect(2).toEqual(expect.toBeWithinRange(1, 3));
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ it('provides toHaveNumberWithinRange', () => {
}).toThrow();
});

describe.skip('when Jest supports variadic asymmetric matchers', () => {
describe('when Jest supports variadic asymmetric matchers', () => {
it('provides expect.toHaveNumberWithinRange', () => {
expect({ foo: { bar: 2 } }).toEqual(expect.toHaveNumberWithinRange('foo.bar', 1, 3));
});
Expand Down

0 comments on commit 9aaedc1

Please sign in to comment.