File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ export function newCache(): {
3535 cacheItem [ 0 ] = value ;
3636 } ,
3737 } ,
38- storageKey : "flags-cache" ,
3938 staleTimeMs : TEST_STALE_MS ,
4039 expireTimeMs : TEST_EXPIRE_MS ,
4140 } ) ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { FLAGS_EXPIRE_MS } from "../src/config";
55import { FlagsClient , RawFlag } from "../src/flag/flags" ;
66import { HttpClient } from "../src/httpClient" ;
77
8- import { flagsResult } from "./mocks/handlers" ;
8+ import { flagResponse , flagsResult } from "./mocks/handlers" ;
99import { newCache , TEST_STALE_MS } from "./flagCache.test" ;
1010import { testLogger } from "./testLogger" ;
1111
@@ -26,6 +26,12 @@ function flagsClientFactory() {
2626
2727 vi . spyOn ( httpClient , "get" ) ;
2828 vi . spyOn ( httpClient , "post" ) ;
29+ vi . spyOn ( globalThis , "fetch" ) . mockResolvedValue (
30+ new Response ( JSON . stringify ( flagResponse ) , {
31+ status : 200 ,
32+ headers : { "Content-Type" : "application/json" } ,
33+ } ) ,
34+ ) ;
2935
3036 return {
3137 cache,
Original file line number Diff line number Diff line change @@ -163,8 +163,8 @@ An Expo example app lives at `packages/react-sdk/dev/expo`.
163163AsyncStorage is automatically detected in React Native if you have
164164` @react-native-async-storage/async-storage ` installed.
165165
166- Since the toolbar is not available in React Native, you can set local overrides
167- programmatically:
166+ If you have your own toolbar-like UI in React Native, you can set local
167+ overrides programmatically:
168168
169169``` tsx
170170const client = useClient ();
You can’t perform that action at this time.
0 commit comments