Skip to content

Commit 8ca405d

Browse files
tests
1 parent 4236798 commit 8ca405d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/compass-global-writes/src/store/index.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,18 @@ describe('GlobalWritesStore Store', function () {
320320
});
321321
});
322322

323+
it('valid shard key -> failsOnShardZoneRequest', async function () {
324+
const store = createStore({
325+
isNamespaceManaged: () => true,
326+
hasShardKey: () => true,
327+
failsOnShardZoneRequest: () => true,
328+
});
329+
await waitFor(() => {
330+
expect(store.getState().status).to.equal('SHARD_KEY_CORRECT');
331+
expect(store.getState().managedNamespace).to.equal(managedNamespace);
332+
});
333+
});
334+
323335
it('valid shard key -> not managed', async function () {
324336
// initial state === shard key correct
325337
const store = createStore({

0 commit comments

Comments
 (0)