import { SetupServer } from 'msw/node'; /** * Creates a custom test server to reduce boilerplate in test files when mocking * Homeflow api requests. * * Most models will use the `Agency` model in some way, often to access the current * agency's `id`. Any usage of the `Agency` will require mocking the `hestia` * `/sites` request, as well as potentially mocking the `dbapi` `/sites` request, which * in turn requires mocking the app authentication request via `users` api. * * Adding each of these mocks to every test file is repetive and bloats the tests * with additional imports. `createHFServer` mocks the default requests required * by most models and allows passing in of model specific mocked requests, * reducing boilerplate code. */ export declare function createHFServer(additionalMocks?: any[]): SetupServer; /** * Function to reduce repeated code in `dbapi` tests. Tests of model statics that * rely on the `dbapi` client should include a test for the api returning an error, * resulting in a lot of repeated code across test files. * * Eg. * ```tsx * it('returns an error if the api responds with an error', async () => { * dbapiMockErrorResponse('connections', server); * * const { results, errors } = await Connection.findAll(); * * expect(errors).not.toBeNull(); * expect(results).toHaveLength(0); * expect(errors?.[0].message).toBe('Something went wrong'); * }); * ``` */ export declare function dbapiMockErrorResponse(path: string, server: SetupServer): void; //# sourceMappingURL=node-test-helpers.d.ts.map