2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/tests/testSetupInstance.spec.ts
18alantom 9877bf4fd3 incr: simplify doc a bit
- allow nulls in converter else not not null'll fail
2022-05-23 16:18:22 +05:30

26 lines
858 B
TypeScript

import { DatabaseManager } from 'backend/database/manager';
import { assertDoesNotThrow } from 'backend/database/tests/helpers';
import { Fyo } from 'fyo';
import { DummyAuthDemux } from 'fyo/tests/helpers';
import 'mocha';
import setupInstance from 'src/setup/setupInstance';
import { getTestSetupWizardOptions } from './helpers';
const DB_PATH = '/Users/alan/Desktop/test.db';
describe('setupInstance', function () {
const fyo = new Fyo({
DatabaseDemux: DatabaseManager,
AuthDemux: DummyAuthDemux,
isTest: true,
isElectron: false,
});
const setupOptions = getTestSetupWizardOptions();
specify('setupInstance', async function () {
await setupInstance(DB_PATH, setupOptions, fyo);
await assertDoesNotThrow(async () => {
// await setupInstance(':memory:', setupOptions, fyo);
}, 'setup instance failed');
});
});