2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/tests/testSetupInstance.spec.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
858 B
TypeScript
Raw Normal View History

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');
});
});