From 57f17c28822655e1fae964703756c4d044cce1b3 Mon Sep 17 00:00:00 2001 From: Abner Soares Alves Junior Date: Wed, 20 Jul 2022 14:35:29 -0400 Subject: [PATCH] feat: adds deepStrictEqual to Chai Assert list --- src/transformers/chai-assert.test.ts | 2 ++ src/transformers/chai-assert.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/transformers/chai-assert.test.ts b/src/transformers/chai-assert.test.ts index 4d92ae28..1304d9f3 100644 --- a/src/transformers/chai-assert.test.ts +++ b/src/transformers/chai-assert.test.ts @@ -72,6 +72,8 @@ describe('Mapping Test', () => { ['assert.notStrictEqual(foo, bar, baz);', 'expect(foo).not.toBe(bar);'], ['assert.deepEqual(foo, bar, baz);', 'expect(foo).toEqual(bar);'], ['assert.notDeepEqual(foo, bar, baz);', 'expect(foo).not.toEqual(bar);'], + ['assert.deepStrictEqual(foo, bar, baz);', 'expect(foo).toStrictEqual(bar);'], + ['assert.notDeepStrictEqual(foo, bar, baz);', 'expect(foo).not.toStrictEqual(bar);'], ['assert.isAbove(foo, bar, baz);', 'expect(foo).toBeGreaterThan(bar);'], ['assert.isAtLeast(foo, bar, baz);', 'expect(foo).toBeGreaterThanOrEqual(bar);'], ['assert.isBelow(foo, bar, baz);', 'expect(foo).toBeLessThan(bar);'], diff --git a/src/transformers/chai-assert.ts b/src/transformers/chai-assert.ts index 8f3522d0..b6c5e15a 100644 --- a/src/transformers/chai-assert.ts +++ b/src/transformers/chai-assert.ts @@ -50,6 +50,11 @@ const assertToExpectMapping = [ expect: 'toEqual', includeNegative: 'notDeepEqual', }, + { + assert: 'deepStrictEqual', + expect: 'toStrictEqual', + includeNegative: 'notDeepStrictEqual', + }, { assert: 'isAbove', expect: 'toBeGreaterThan',