From bee3afb5c2644218f57a65907547b12f5c6e93cb Mon Sep 17 00:00:00 2001 From: Matt Fellows <53900+mefellows@users.noreply.github.com> Date: Mon, 15 Jul 2024 11:13:57 +1000 Subject: [PATCH] fix: nullValue matcher does not reify (#1230) Fixes #1229 Co-authored-by: mefellows --- src/v3/matchers.spec.ts | 3 +++ src/v3/matchers.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/v3/matchers.spec.ts b/src/v3/matchers.spec.ts index cbc63fefc..5b7c00dae 100644 --- a/src/v3/matchers.spec.ts +++ b/src/v3/matchers.spec.ts @@ -465,6 +465,7 @@ describe('V3 Matchers', () => { const result = MatchersV3.nullValue(); expect(result).to.deep.equal({ 'pact:matcher:type': 'null', + value: null, }); }); }); @@ -604,6 +605,7 @@ describe('V3 Matchers', () => { more: 'strings', an: ['array'], another: MatchersV3.eachLike('this'), + null: MatchersV3.nullValue(), someObject: { withData: MatchersV3.like(true), withTerm: MatchersV3.regex('this|that', 'this'), @@ -617,6 +619,7 @@ describe('V3 Matchers', () => { more: 'strings', an: ['array'], another: ['this'], + null: null, someObject: { withData: true, withTerm: 'this', diff --git a/src/v3/matchers.ts b/src/v3/matchers.ts index 39a3b53dc..3d6d4ceb0 100644 --- a/src/v3/matchers.ts +++ b/src/v3/matchers.ts @@ -405,6 +405,7 @@ export function includes(value: string): Matcher { export function nullValue(): Matcher { return { 'pact:matcher:type': 'null', + value: null, }; }