use a one-argument constructor instead of setters

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-01-07 17:28:48 +01:00
parent 6bf7826258
commit 19ea047412
5 changed files with 126 additions and 72 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ describe('TechDocsStorageClient', () => {
const identityApi: jest.Mocked<IdentityApi> = {
getCredentials: jest.fn(),
} as unknown as jest.Mocked<IdentityApi>;
const fetchApi = new MockFetchApi().setAuthorization({ identityApi });
const fetchApi = new MockFetchApi({ authorization: { identityApi } });
beforeEach(() => {
jest.resetAllMocks();