Skip to content

Commit 4a15070

Browse files
committed
Fix sdk-client tests.
1 parent 19585cb commit 4a15070

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

packages/shared/sdk-client/__tests__/LDClientImpl.hooks.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ it('should use hooks registered during configuration', async () => {
2929
{
3030
sendEvents: false,
3131
hooks: [testHook],
32+
logger: {
33+
debug: jest.fn(),
34+
info: jest.fn(),
35+
warn: jest.fn(),
36+
error: jest.fn(),
37+
},
3238
},
3339
factory,
3440
);
@@ -74,6 +80,12 @@ it('should execute hooks that are added using addHook', async () => {
7480
platform,
7581
{
7682
sendEvents: false,
83+
logger: {
84+
debug: jest.fn(),
85+
info: jest.fn(),
86+
warn: jest.fn(),
87+
error: jest.fn(),
88+
},
7789
},
7890
factory,
7991
);

packages/shared/sdk-client/__tests__/TestDataManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default class TestDataManager extends BaseDataManager {
8484
export function makeTestDataManagerFactory(
8585
sdkKey: string,
8686
platform: Platform,
87-
options: {
87+
options?: {
8888
disableNetwork?: boolean;
8989
},
9090
): DataManagerFactory {
@@ -118,7 +118,7 @@ export function makeTestDataManagerFactory(
118118
}),
119119
baseHeaders,
120120
emitter,
121-
!!options.disableNetwork,
121+
!!options?.disableNetwork,
122122
diagnosticsManager,
123123
);
124124
}

0 commit comments

Comments
 (0)