2
0
mirror of https://github.com/frappe/books.git synced 2025-01-22 22:58:28 +00:00
books/tests/helpers.js

15 lines
394 B
JavaScript
Raw Normal View History

2018-01-16 11:39:17 +05:30
const server = require('frappejs/server');
const frappe = require('frappejs');
2018-01-12 17:55:07 +05:30
module.exports = {
async initSqlite({dbPath = '_test.db', models} = {}) {
2018-01-24 17:22:05 +05:30
server.init();
if (models) {
2018-03-05 22:15:21 +05:30
frappe.registerModels(models, 'server');
}
await server.initDb({
2018-01-12 17:55:07 +05:30
backend: 'sqlite',
connectionParams: {dbPath: dbPath},
2018-01-12 17:55:07 +05:30
});
}
}