Skip to content

Commit b12b0dc

Browse files
authored
fix: wait for the state to eventually match (#7008)
wait for the state to eventually match
1 parent dc7b280 commit b12b0dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/compass-connection-import-export/src/hooks/use-export-connections.spec.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,12 @@ describe('useExportConnections', function () {
133133
await connectionsStore.actions.refreshConnections();
134134
});
135135

136-
expect(result.current.state.connectionList).to.deep.equal([
137-
{ id: connectionInfo1.id, name: 'name1', selected: false },
138-
{ id: connectionInfo2.id, name: 'name2', selected: true },
139-
]);
136+
await waitFor(() => {
137+
expect(result.current.state.connectionList).to.deep.equal([
138+
{ id: connectionInfo1.id, name: 'name1', selected: false },
139+
{ id: connectionInfo2.id, name: 'name2', selected: true },
140+
]);
141+
});
140142
});
141143

142144
it('updates filename if changed', function () {

0 commit comments

Comments
 (0)