Commit 810bdd5b authored by Robert Knight's avatar Robert Knight

Fix a previously silent test failure

Fix a test that was failing but failing in a way that went unreported
previously due to a combination of it occurring after the test function returned
because of a missing `await` call and because of the issue with uncaught
exceptions between tests described in https://github.com/hypothesis/client/issues/2249.

This test was failing but the failure was only reported after the test
function returned due to a missing `await`.
parent d1b33dad
......@@ -282,9 +282,15 @@ describe('loadAnnotationsService', () => {
references: ['parent_annotation_1', 'parent_annotation_2'],
},
];
it('clears annotations from the store first', () => {
it('clears annotations from the store first', async () => {
fakeApi.annotation.get.onFirstCall().resolves({
id: 'target_annotation',
references: [],
});
const svc = createService();
svc.loadThread('target_annotation');
await svc.loadThread('target_annotation');
assert.calledOnce(fakeStore.clearAnnotations);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment