Closed ExplodingCabbage closed 2 years ago
When I try to use the ldClientMock in TypeScript in a place where an LDClient is expected, I get this error:
ldClientMock
error TS2345: Argument of type '{ track: Mock<any, any>; identify: Mock<any, any>; allFlags: Mock<any, any>; close: Mock<any, any>; flush: Mock<any, any>; getUser: Mock<any, any>; ... 7 more ...; waitUntilReady: Mock<...>; }' is not assignable to parameter of type 'LDClient'. Property 'alias' is missing in type '{ track: Mock<any, any>; identify: Mock<any, any>; allFlags: Mock<any, any>; close: Mock<any, any>; flush: Mock<any, any>; getUser: Mock<any, any>; ... 7 more ...; waitUntilReady: Mock<...>; }' but required in type 'LDClient'.
Versions:
> require('jest-launchdarkly-mock/package').version '0.2.1' > require('launchdarkly-js-client-sdk').version '2.19.1'
It looks like https://github.com/launchdarkly-labs/jest-launchdarkly-mock/pull/5 already fixes this, but has only been merged to the contrib branch, not to master, and wasn't included in the latest release.
contrib
master
@ExplodingCabbage we have an upcoming release to fix this. I'll update the issue when that's done. Thank you for your patience.
This is now fixed in v1.0.0.
When I try to use the
ldClientMock
in TypeScript in a place where an LDClient is expected, I get this error:Versions:
It looks like https://github.com/launchdarkly-labs/jest-launchdarkly-mock/pull/5 already fixes this, but has only been merged to the
contrib
branch, not tomaster
, and wasn't included in the latest release.