11import { OpenFeature , Client , ErrorCode } from '@openfeature/js-sdk' ;
2- import { LDClient } from 'launchdarkly- node-server-sdk' ;
2+ import { LDClient } from '@ launchdarkly/ node-server-sdk' ;
33import { LaunchDarklyProvider } from '../src' ;
44import translateContext from '../src/translateContext' ;
55import TestLogger from './TestLogger' ;
@@ -45,7 +45,7 @@ describe('given a mock LaunchDarkly client', () => {
4545 } ,
4646 } ) ) ;
4747 const res = await ofClient . getBooleanDetails ( testFlagKey , false , basicContext ) ;
48- expect ( res ) . toEqual ( {
48+ expect ( res ) . toMatchObject ( {
4949 flagKey : testFlagKey ,
5050 value : true ,
5151 reason : 'OFF' ,
@@ -60,7 +60,7 @@ describe('given a mock LaunchDarkly client', () => {
6060 } ,
6161 } ) ) ;
6262 const res = await ofClient . getBooleanDetails ( testFlagKey , false , basicContext ) ;
63- expect ( res ) . toEqual ( {
63+ expect ( res ) . toMatchObject ( {
6464 flagKey : testFlagKey ,
6565 value : false ,
6666 reason : 'ERROR' ,
@@ -92,7 +92,7 @@ describe('given a mock LaunchDarkly client', () => {
9292 } ,
9393 } ) ) ;
9494 const res = await ofClient . getStringDetails ( testFlagKey , 'default' , basicContext ) ;
95- expect ( res ) . toEqual ( {
95+ expect ( res ) . toMatchObject ( {
9696 flagKey : testFlagKey ,
9797 value : 'good' ,
9898 reason : 'OFF' ,
@@ -107,7 +107,7 @@ describe('given a mock LaunchDarkly client', () => {
107107 } ,
108108 } ) ) ;
109109 const res = await ofClient . getStringDetails ( testFlagKey , 'default' , basicContext ) ;
110- expect ( res ) . toEqual ( {
110+ expect ( res ) . toMatchObject ( {
111111 flagKey : testFlagKey ,
112112 value : 'default' ,
113113 reason : 'ERROR' ,
@@ -139,7 +139,7 @@ describe('given a mock LaunchDarkly client', () => {
139139 } ,
140140 } ) ) ;
141141 const res = await ofClient . getNumberDetails ( testFlagKey , 0 , basicContext ) ;
142- expect ( res ) . toEqual ( {
142+ expect ( res ) . toMatchObject ( {
143143 flagKey : testFlagKey ,
144144 value : 17 ,
145145 reason : 'OFF' ,
@@ -154,7 +154,7 @@ describe('given a mock LaunchDarkly client', () => {
154154 } ,
155155 } ) ) ;
156156 const res = await ofClient . getNumberDetails ( testFlagKey , 0 , basicContext ) ;
157- expect ( res ) . toEqual ( {
157+ expect ( res ) . toMatchObject ( {
158158 flagKey : testFlagKey ,
159159 value : 0 ,
160160 reason : 'ERROR' ,
@@ -186,7 +186,7 @@ describe('given a mock LaunchDarkly client', () => {
186186 } ,
187187 } ) ) ;
188188 const res = await ofClient . getObjectDetails ( testFlagKey , { } , basicContext ) ;
189- expect ( res ) . toEqual ( {
189+ expect ( res ) . toMatchObject ( {
190190 flagKey : testFlagKey ,
191191 value : { some : 'value' } ,
192192 reason : 'OFF' ,
@@ -201,7 +201,7 @@ describe('given a mock LaunchDarkly client', () => {
201201 } ,
202202 } ) ) ;
203203 const res = await ofClient . getObjectDetails ( testFlagKey , { } , basicContext ) ;
204- expect ( res ) . toEqual ( {
204+ expect ( res ) . toMatchObject ( {
205205 flagKey : testFlagKey ,
206206 value : { } ,
207207 reason : 'ERROR' ,
@@ -225,7 +225,7 @@ describe('given a mock LaunchDarkly client', () => {
225225 } ,
226226 } ) ) ;
227227 const res = await ofClient . getObjectDetails ( testFlagKey , { } , basicContext ) ;
228- expect ( res ) . toEqual ( {
228+ expect ( res ) . toMatchObject ( {
229229 flagKey : testFlagKey ,
230230 value : { yes : 'no' } ,
231231 reason : 'ERROR' ,
@@ -242,7 +242,7 @@ describe('given a mock LaunchDarkly client', () => {
242242 } ,
243243 } ) ) ;
244244 const res = await ofClient . getObjectDetails ( testFlagKey , { } , basicContext ) ;
245- expect ( res ) . toEqual ( {
245+ expect ( res ) . toMatchObject ( {
246246 flagKey : testFlagKey ,
247247 value : { yes : 'no' } ,
248248 variant : '22' ,
0 commit comments