mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
d0571a2450
- update files to ignore - delete babel.config.js
24 lines
637 B
TypeScript
24 lines
637 B
TypeScript
import { DatabaseManager } from 'backend/database/manager';
|
|
import { setupDummyInstance } from 'dummy';
|
|
import { unlink } from 'fs/promises';
|
|
import { Fyo } from 'fyo';
|
|
import { DummyAuthDemux } from 'fyo/tests/helpers';
|
|
import { getTestDbPath } from 'tests/helpers';
|
|
|
|
async function run() {
|
|
const fyo = new Fyo({
|
|
DatabaseDemux: DatabaseManager,
|
|
AuthDemux: DummyAuthDemux,
|
|
isTest: true,
|
|
isElectron: false,
|
|
});
|
|
const dbPath = getTestDbPath();
|
|
|
|
await setupDummyInstance(dbPath, fyo, 1, 100);
|
|
await fyo.close();
|
|
await unlink(dbPath);
|
|
}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
run();
|