insomnia/packages/insomnia-app/app/__jest__/before-each.ts
Dimitri Mitropoulos 5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00

17 lines
390 B
TypeScript

import { database as db } from '../common/database';
import * as models from '../models';
import * as fetch from '../account/fetch';
export async function globalBeforeEach() {
// Setup the local database in case it's used
fetch.setup('insomnia-tests', 'http://localhost:8000');
await db.init(
models.types(),
{
inMemoryOnly: true,
},
true,
() => {},
);
}