2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 15:50:56 +00:00
books/tests/helpers.ts

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

24 lines
662 B
TypeScript
Raw Normal View History

2022-04-25 06:33:31 +00:00
import { config } from 'dotenv';
import { SetupWizardOptions } from 'src/setup/types';
import { getFiscalYear } from 'utils/misc';
export function getTestSetupWizardOptions(): SetupWizardOptions {
return {
2022-04-25 06:33:31 +00:00
logo: null,
companyName: 'Test Company',
country: 'India',
fullname: 'Test Person',
email: 'test@testmyfantasy.com',
bankName: 'Test Bank of Scriptia',
currency: 'INR',
fiscalYearStart: getFiscalYear('04-01', true),
fiscalYearEnd: getFiscalYear('04-01', false),
chartOfAccounts: 'India - Chart of Accounts',
};
}
2022-04-25 06:33:31 +00:00
export function getTestDbPath() {
config();
return process.env.TEST_DB_PATH ?? ':memory:';
}