Skip to content

Commit

Permalink
Fix sdk-client tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Oct 3, 2024
1 parent 19585cb commit 4a15070
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions packages/shared/sdk-client/__tests__/LDClientImpl.hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ it('should use hooks registered during configuration', async () => {
{
sendEvents: false,
hooks: [testHook],
logger: {
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
},
},
factory,
);
Expand Down Expand Up @@ -74,6 +80,12 @@ it('should execute hooks that are added using addHook', async () => {
platform,
{
sendEvents: false,
logger: {
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
},
},
factory,
);
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/sdk-client/__tests__/TestDataManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default class TestDataManager extends BaseDataManager {
export function makeTestDataManagerFactory(
sdkKey: string,
platform: Platform,
options: {
options?: {
disableNetwork?: boolean;
},
): DataManagerFactory {
Expand Down Expand Up @@ -118,7 +118,7 @@ export function makeTestDataManagerFactory(
}),
baseHeaders,
emitter,
!!options.disableNetwork,
!!options?.disableNetwork,
diagnosticsManager,
);
}

0 comments on commit 4a15070

Please sign in to comment.