mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
move ApiResponseError assertion function to separate file
This commit is contained in:
@@ -15,11 +15,7 @@ import {
|
||||
updateGlobalFetchMockJson,
|
||||
updateGlobalFetchMockJsonToThrowSyntaxError
|
||||
} from "../testHelpers/fetchMockHelpers";
|
||||
import { ApiResponseError } from "../../src/loaders/ApiResponseError";
|
||||
|
||||
async function assertAsyncCallbackThrowsApiResponseError(callback: () => Promise<any>) {
|
||||
await expect(callback).rejects.toThrow(ApiResponseError);
|
||||
}
|
||||
import { assertAsyncCallbackThrowsApiResponseError } from "../testHelpers/assertAsyncCallbackThrowsApiResponseError";
|
||||
|
||||
describe("ApiBasedRepositoryLoader", () => {
|
||||
let loader: ApiBasedShuttleRepositoryLoader;
|
||||
|
||||
Reference in New Issue
Block a user