Skip to content

Commit bdf0b5b

Browse files
committed
Test description
1 parent d344012 commit bdf0b5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/react.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe('FlagsmithProvider', () => {
124124
expect(JSON.parse(screen.getByTestId("flags").innerHTML)).toEqual(removeIds(defaultState.flags));
125125
});
126126
});
127-
it('handles race condition of init returning after identify', async () => {
127+
it('ignores init response if identify gets called and resolves first', async () => {
128128

129129
const onChange = jest.fn();
130130
const {flagsmith,initConfig, mockFetch} = getFlagsmith({onChange})
@@ -135,7 +135,7 @@ describe('FlagsmithProvider', () => {
135135
id: 1,
136136
name: "hero"
137137
}
138-
}],300) // never resolves
138+
}],300) // resolves after flagsmith.identify, it should be ignored
139139

140140
render(
141141
<FlagsmithProvider flagsmith={flagsmith} options={initConfig}>

0 commit comments

Comments
 (0)