Skip to content

Commit 5c094ec

Browse files
committed
add test
1 parent 5d8502b commit 5c094ec

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const managedNamespace: ManagedNamespace = {
5050
const failedShardingProcess: AutomationAgentProcess = {
5151
statusType: 'ERROR',
5252
workingOnShort: 'ShardingCollections',
53-
errorText: `Failed to shard ${NS}`,
53+
errorText: `before timestamp[01:02:03.456]Failed to shard ${NS}`,
5454
};
5555

5656
function createAuthFetchResponse<
@@ -199,7 +199,7 @@ describe('GlobalWritesStore Store', function () {
199199
});
200200
});
201201

202-
it('not managed -> sharding -> sharding error', async function () {
202+
it.only('not managed -> sharding -> sharding error', async function () {
203203
let mockFailure = false;
204204
// initial state === unsharded
205205
const store = createStore({
@@ -224,6 +224,9 @@ describe('GlobalWritesStore Store', function () {
224224
clock.tick(POLLING_INTERVAL);
225225
await waitFor(() => {
226226
expect(store.getState().status).to.equal('SHARDING_ERROR');
227+
expect(store.getState().shardingError).to.equal(
228+
`Failed to shard ${NS}`
229+
); // the original error text was: `before timestamp[01:02:03.456]Failed to shard ${NS}`
227230
});
228231
});
229232

0 commit comments

Comments
 (0)