mirror of
https://github.com/Kong/insomnia.git
synced 2026-06-03 05:35:56 -04:00
Move insomnia-data models, services, database code, and common utilities into a dedicated workspace package. Update consumers to import from the new package entrypoints and declare workspace dependencies for the extracted package.
14 lines
399 B
TypeScript
14 lines
399 B
TypeScript
import { initDatabase, initServices } from 'insomnia-data';
|
|
import { createNedbDatabase, servicesNodeImpl } from 'insomnia-data/node';
|
|
import { vi } from 'vitest';
|
|
|
|
const database = createNedbDatabase();
|
|
await initDatabase(database, { inMemoryOnly: true }, true);
|
|
await initServices(servicesNodeImpl);
|
|
|
|
import { v4Mock } from './__mocks__/uuid';
|
|
|
|
vi.mock('uuid', () => ({
|
|
v4: () => v4Mock(),
|
|
}));
|