Skip to content

Commit 314cf4c

Browse files
committed
add test
1 parent 0bbad07 commit 314cf4c

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
@@ -52,7 +52,7 @@ const managedNamespace: ManagedNamespace = {
5252
const failedShardingProcess: AutomationAgentProcess = {
5353
statusType: 'ERROR',
5454
workingOnShort: 'ShardingCollections',
55-
errorText: `Failed to shard ${NS}`,
55+
errorText: `before timestamp[01:02:03.456]Failed to shard ${NS}`,
5656
};
5757

5858
function createAuthFetchResponse<
@@ -205,7 +205,7 @@ describe('GlobalWritesStore Store', function () {
205205
});
206206
});
207207

208-
it('not managed -> sharding -> sharding error', async function () {
208+
it.only('not managed -> sharding -> sharding error', async function () {
209209
let mockFailure = false;
210210
// initial state === unsharded
211211
const store = createStore({
@@ -230,6 +230,9 @@ describe('GlobalWritesStore Store', function () {
230230
clock.tick(POLLING_INTERVAL);
231231
await waitFor(() => {
232232
expect(store.getState().status).to.equal('SHARDING_ERROR');
233+
expect(store.getState().shardingError).to.equal(
234+
`Failed to shard ${NS}`
235+
); // the original error text was: `before timestamp[01:02:03.456]Failed to shard ${NS}`
233236
});
234237
});
235238

0 commit comments

Comments
 (0)