From deda46defd0a28a50a31c9c9639c5fce7454c32e Mon Sep 17 00:00:00 2001 From: Naitik Shah Date: Fri, 17 Jun 2022 18:19:59 +0400 Subject: [PATCH 1/2] fix throws test with changed error text --- test/inject.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/inject.js b/test/inject.js index a602c6c..622cd6e 100644 --- a/test/inject.js +++ b/test/inject.js @@ -31,7 +31,8 @@ test('throws', () => { assert.unreachable('should throw'); } catch (err) { assert.instance(err, TypeError); - assert.is(err.message, `Cannot read property 'foo' of undefined`); + assert.match(err.message, 'Cannot read'); + assert.match(err.message, 'of undefined'); } }); From 7a87e3892823a6a7f1f6b3229642fc424f44bfe8 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Sat, 2 Jul 2022 07:53:07 -0700 Subject: [PATCH 2/2] Update test/inject.js --- test/inject.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/inject.js b/test/inject.js index 622cd6e..5d4371c 100644 --- a/test/inject.js +++ b/test/inject.js @@ -31,8 +31,7 @@ test('throws', () => { assert.unreachable('should throw'); } catch (err) { assert.instance(err, TypeError); - assert.match(err.message, 'Cannot read'); - assert.match(err.message, 'of undefined'); + assert.match(err.message, /Cannot read propert(ies|y 'foo') of undefined/); } });