init commit
This commit is contained in:
parent
ae639426d0
commit
7a491681cc
257 changed files with 95524 additions and 80 deletions
14
integration_test/testutil/config.js
Normal file
14
integration_test/testutil/config.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const loadFromToml = require('../../lib/configuration/configloader').loadFromToml;
|
||||
const path = require('path');
|
||||
|
||||
class IntegrationTestConfig {
|
||||
constructor(config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
get knexConfig() {
|
||||
return this.config.database;
|
||||
}
|
||||
}
|
||||
|
||||
exports.testConfig = loadFromToml(IntegrationTestConfig, path.resolve(__dirname, '..', '..', 'conf', 'integration-test.toml'));
|
||||
4
integration_test/testutil/db.js
Normal file
4
integration_test/testutil/db.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
const testConfig = require('./config').testConfig;
|
||||
const Database = require('../../lib/database').Database;
|
||||
|
||||
exports.testDB = new Database(testConfig.knexConfig);
|
||||
4
integration_test/testutil/o.js
Normal file
4
integration_test/testutil/o.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
exports.o = function o(obj) {
|
||||
// Workaround for knex returning RowDataPacket and failing assertions
|
||||
return Object.assign({}, obj);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue