From ac5484782f18308d8af39b34d1042282d0fbe559 Mon Sep 17 00:00:00 2001 From: darcyrush Date: Mon, 19 Aug 2024 11:17:32 +0200 Subject: [PATCH 1/2] Update stub-builder.ts to support falsy overrides --- src/stub-builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stub-builder.ts b/src/stub-builder.ts index 35a86d0..a1ba8b7 100644 --- a/src/stub-builder.ts +++ b/src/stub-builder.ts @@ -66,7 +66,7 @@ export const StubbedInstanceCreator = ( target: Record, prop: string ) => { - if (!target[prop]) { + if (!(prop in target)) { target[prop] = createStub(prop); } }; From 08e6630f2e0f3e85b5817984500b70fda3750abb Mon Sep 17 00:00:00 2001 From: ShellyDCMS <60476837+ShellyDCMS@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:46:14 +0300 Subject: [PATCH 2/2] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e96fd38..278c3d2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ts-stubber", "description": "Lazy Stubbing a TypeScript Class or Interface with any Mocking Framework for testing in Isolation", - "version": "1.0.15", + "version": "1.0.16", "author": "Shelly Goldblit", "private": false, "license": "MIT",