Skip to content

Commit b66b5ac

Browse files
committed
fix
1 parent 6c7f660 commit b66b5ac

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

lib/project_config/config_manager_factory.react_native.spec.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,16 @@ describe('createPollingConfigManager', () => {
138138
expect(mockGetOpaquePollingConfigManager).toHaveBeenNthCalledWith(1, expect.objectContaining(config));
139139
});
140140

141-
it('passes customHeaders through to the underlying config manager', () => {
142-
const customHeaders = {
143-
'X-Custom-Header': 'custom-value',
144-
'X-Another-Header': 'another-value',
145-
};
146-
141+
it('Should not throw error if a cache is present in the config, and async storage is not available', async () => {
142+
isAsyncStorageAvailable = false;
147143
const config = {
148144
sdkKey: 'sdkKey',
149-
customHeaders,
145+
requestHandler: { makeRequest: vi.fn() },
146+
cache: getMockSyncCache<string>(),
150147
};
151148

152-
createPollingProjectConfigManager(config);
153-
expect(mockGetOpaquePollingConfigManager).toHaveBeenCalledWith(
154-
expect.objectContaining({
155-
customHeaders,
156-
})
157-
);
149+
expect(() => createPollingProjectConfigManager(config)).not.toThrow();
150+
isAsyncStorageAvailable = true;
158151
});
159152

160153
it('should throw an error if cache is not present in the config, and async storage is not available', async () => {

0 commit comments

Comments
 (0)