From be2b907ec583704460ebe0800d2d5955dac01e8e Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Fri, 11 May 2018 01:36:24 +0200 Subject: [PATCH] Limit assertion check to startsWith('AssertionError') --- test/unit/check/property/AsyncProperty.spec.ts | 2 +- test/unit/check/property/Property.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/check/property/AsyncProperty.spec.ts b/test/unit/check/property/AsyncProperty.spec.ts index 0daa06bcc2c..e4b9707596c 100644 --- a/test/unit/check/property/AsyncProperty.spec.ts +++ b/test/unit/check/property/AsyncProperty.spec.ts @@ -30,7 +30,7 @@ describe('AsyncProperty', () => { }); const out = await p.run(p.generate(stubRng.mutable.nocall()).value); assert.ok( - out!.startsWith('AssertionError [ERR_ASSERTION]: false == true'), + out!.startsWith('AssertionError'), `Property should fail and attach the exception as string, got: ${out}` ); assert.ok(out!.indexOf('\n\nStack trace:') !== -1, 'Property should include the stack trace when available'); diff --git a/test/unit/check/property/Property.spec.ts b/test/unit/check/property/Property.spec.ts index 3f026bea64b..7e1599e7808 100644 --- a/test/unit/check/property/Property.spec.ts +++ b/test/unit/check/property/Property.spec.ts @@ -30,7 +30,7 @@ describe('Property', () => { }); const out = p.run(p.generate(stubRng.mutable.nocall()).value); assert.ok( - out!.startsWith('AssertionError [ERR_ASSERTION]: false == true'), + out!.startsWith('AssertionError'), `Property should fail and attach the exception as string, got: ${out}` ); assert.ok(out!.indexOf('\n\nStack trace:') !== -1, 'Property should include the stack trace when available');