More tests for UserInfo (#10677)

* UserInfo-test: move mocking to `beforeEach`

... so that changes to the mocks do not leak between tests

* Add some more tests for UserInfo
This commit is contained in:
Richard van der Hoff 2023-04-21 14:48:27 +01:00 committed by GitHub
parent 893feed13b
commit 83f12fcba0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 171 additions and 93 deletions

View file

@ -127,7 +127,7 @@ export function untilEmission(
});
}
export const flushPromises = async () => await new Promise((resolve) => window.setTimeout(resolve));
export const flushPromises = async () => await new Promise<void>((resolve) => window.setTimeout(resolve));
// with jest's modern fake timers process.nextTick is also mocked,
// flushing promises in the normal way then waits for some advancement