Clarify and strengthen state invariant tests
This commit is contained in:
@@ -26,7 +26,7 @@ function deferred() {
|
||||
return { promise, resolve };
|
||||
}
|
||||
|
||||
test('an older polling promise cannot replace a newer mutation snapshot', async () => {
|
||||
test('data invariant: an older polling promise cannot replace a newer mutation snapshot', async () => {
|
||||
let state = receive(initialHarborState, snapshot(1, 'one'));
|
||||
const poll = deferred();
|
||||
const mutation = deferred();
|
||||
@@ -68,7 +68,7 @@ test('pending selection is cleared when its server disappears', () => {
|
||||
assert.equal(receive(state, snapshot(2, 'one', ['one'])).pendingServerId, '');
|
||||
});
|
||||
|
||||
test('initial 500 and connection refusal become retryable boot failures', () => {
|
||||
test('data invariant: initial control outage is retryable without a fabricated snapshot', () => {
|
||||
const serverError = Object.assign(new Error('Internal Server Error'), { status: 500 });
|
||||
const refused = new TypeError('fetch failed');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user