Skip to content

Commit

Permalink
tape: notEquals, deepEquals, isNotDeeply (#88)
Browse files Browse the repository at this point in the history
* tape: deepEquals is the same as deepEqual

I'm not totally sure of this, but it was one of the things that wasn't switched in our codebase.

* Update tape.test.js

* add more aliases

* Update tape.test.js
  • Loading branch information
Haroenv authored and skovhus committed Oct 24, 2017
1 parent a2ded2a commit 3f19436
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transformers/tape.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const tPropertiesMap = {
strictEquals: 'toBe',

notEqual: 'not.toBe',
notEquals: 'not.toBe',
notStrictEqual: 'not.toBe',
notStrictEquals: 'not.toBe',
isNotEqual: 'not.toBe',
Expand All @@ -45,6 +46,7 @@ const tPropertiesMap = {
isInequal: 'not.toBe',

deepEqual: 'toEqual',
deepEquals: 'toEqual',
isEquivalent: 'toEqual',
same: 'toEqual',

Expand All @@ -53,6 +55,7 @@ const tPropertiesMap = {
notDeeply: 'not.toEqual',
notSame: 'not.toEqual',
isNotDeepEqual: 'not.toEqual',
isNotDeeply: 'not.toEqual',
isNotEquivalent: 'not.toEqual',
isInequivalent: 'not.toEqual',

Expand Down
6 changes: 6 additions & 0 deletions src/transformers/tape.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ test((t) => {
t.strictEquals(1, 2, 'msg');
t.notEqual(1, 2, 'msg');
t.notEquals(1, 2, 'msg');
t.notStrictEqual(1, 2, 'msg');
t.notStrictEquals(1, 2, 'msg');
t.isNotEqual(1, 2, 'msg');
Expand All @@ -93,6 +94,7 @@ test((t) => {
t.isInequal(1, 2, 'msg');
t.deepEqual(app.x, {foo: 2}, 'msg');
t.deepEquals(app.x, {foo: 2}, 'msg');
t.isEquivalent(1, 2, 'msg');
t.same(1, 2, 'msg');
Expand All @@ -101,6 +103,7 @@ test((t) => {
t.notDeeply(1, 2, 'msg');
t.notSame(1, 2, 'msg');
t.isNotDeepEqual(1, 2, 'msg');
t.isNotDeeply(1, 2, 'msg');
t.isNotEquivalent(1, 2, 'msg');
t.isInequivalent(1, 2, 'msg');
Expand Down Expand Up @@ -139,10 +142,12 @@ test(done => {
expect(1).not.toBe(2);
expect(1).not.toBe(2);
expect(1).not.toBe(2);
expect(1).not.toBe(2);
expect(1).not.toBe(2);
expect(1).not.toBe(2);
expect(app.x).toEqual({foo: 2});
expect(app.x).toEqual({foo: 2});
expect(1).toEqual(2);
expect(1).toEqual(2);
Expand All @@ -154,6 +159,7 @@ test(done => {
expect(1).not.toEqual(2);
expect(1).not.toEqual(2);
expect(1).not.toEqual(2);
expect(1).not.toEqual(2);
// t.skip('msg');
expect.assertions(3);
Expand Down

0 comments on commit 3f19436

Please sign in to comment.