From 856b356019132adcdba4171ee1db964ac195ed97 Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Wed, 13 Mar 2019 23:55:48 +0100 Subject: [PATCH] Remove unecessary comments --- .../src/__tests__/matchers-toContain.property.test.ts | 10 ++++------ .../__tests__/matchers-toContainEqual.property.test.ts | 8 +++----- .../src/__tests__/matchers-toEqual.property.test.ts | 5 ++--- .../__tests__/matchers-toStrictEqual.property.test.ts | 5 ++--- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/packages/expect/src/__tests__/matchers-toContain.property.test.ts b/packages/expect/src/__tests__/matchers-toContain.property.test.ts index b44c40c232ba..29e9b4c1d4e5 100644 --- a/packages/expect/src/__tests__/matchers-toContain.property.test.ts +++ b/packages/expect/src/__tests__/matchers-toContain.property.test.ts @@ -20,8 +20,7 @@ describe('toContain', () => { fc.array(fc.anything(anythingSettings)), fc.anything(anythingSettings).filter(v => !Number.isNaN(v)), (startValues, endValues, v) => { - // Given: startValues, endValues arrays and v value (not NaN) - // Assert: We expect `expect([...startValues, v, ...endValues]).toContain(v)` + // Given: startValues, endValues arrays and v value (not NaN) expect([...startValues, v, ...endValues]).toContain(v); }, ), @@ -36,10 +35,9 @@ describe('toContain', () => { fc.array(fc.anything(anythingSettings)), fc.dedup(fc.anything(anythingSettings), 2), (startValues, endValues, [a, b]) => { - // Given: startValues, endValues arrays - // and [a, b] equal, but not the same values - // with `typeof a === 'object && a !== null` - // Assert: We expect `expect([...startValues, a, ...endValues]).not.toContain(b)` + // Given: startValues, endValues arrays + // and [a, b] equal, but not the same values + // with `typeof a === 'object && a !== null` fc.pre(typeof a === 'object' && a !== null); expect([...startValues, a, ...endValues]).not.toContain(b); }, diff --git a/packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts b/packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts index 0535a99d222f..ab6145a645f7 100644 --- a/packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts +++ b/packages/expect/src/__tests__/matchers-toContainEqual.property.test.ts @@ -20,8 +20,7 @@ describe('toContainEqual', () => { fc.array(fc.anything(anythingSettings)), fc.anything(anythingSettings), (startValues, endValues, v) => { - // Given: startValues, endValues arrays and v any value - // Assert: We expect `expect([...startValues, v, ...endValues]).toContainEqual(v)` + // Given: startValues, endValues arrays and v any value expect([...startValues, v, ...endValues]).toContainEqual(v); }, ), @@ -36,9 +35,8 @@ describe('toContainEqual', () => { fc.array(fc.anything(anythingSettings)), fc.dedup(fc.anything(anythingSettings), 2), (startValues, endValues, [a, b]) => { - // Given: startValues, endValues arrays - // and [a, b] identical values - // Assert: We expect `expect([...startValues, a, ...endValues]).toContainEqual(b)` + // Given: startValues, endValues arrays + // and [a, b] identical values expect([...startValues, a, ...endValues]).toContainEqual(b); }, ), diff --git a/packages/expect/src/__tests__/matchers-toEqual.property.test.ts b/packages/expect/src/__tests__/matchers-toEqual.property.test.ts index dc07faf612f0..ca7d88ef7390 100644 --- a/packages/expect/src/__tests__/matchers-toEqual.property.test.ts +++ b/packages/expect/src/__tests__/matchers-toEqual.property.test.ts @@ -16,8 +16,7 @@ describe('toEqual', () => { it('should be reflexive', () => { fc.assert( fc.property(fc.dedup(fc.anything(anythingSettings), 2), ([a, b]) => { - // Given: a and b identical values - // Assert: We expect `expect(a).toEqual(b)` + // Given: a and b identical values expect(a).toEqual(b); }), assertSettings, @@ -38,7 +37,7 @@ describe('toEqual', () => { fc.anything(anythingSettings), fc.anything(anythingSettings), (a, b) => { - // Given: a and b values + // Given: a and b values // Assert: We expect `expect(a).toEqual(b)` // to be equivalent to `expect(b).toEqual(a)` expect(safeExpectEqual(a, b)).toBe(safeExpectEqual(b, a)); diff --git a/packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts b/packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts index 3b4e44e5c5a6..70dcd4e5cd1b 100644 --- a/packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts +++ b/packages/expect/src/__tests__/matchers-toStrictEqual.property.test.ts @@ -16,8 +16,7 @@ describe('toStrictEqual', () => { it('should be reflexive', () => { fc.assert( fc.property(fc.dedup(fc.anything(anythingSettings), 2), ([a, b]) => { - // Given: a and b identical values - // Assert: We expect `expect(a).toStrictEqual(b)` + // Given: a and b identical values expect(a).toStrictEqual(b); }), assertSettings, @@ -27,7 +26,7 @@ describe('toStrictEqual', () => { it('should be symmetric', () => { const safeExpectStrictEqual = (a, b) => { try { - expect(a).toEqual(b); + expect(a).toStrictEqual(b); return true; } catch (err) { return false;