e2e tests (draft)
This commit is contained in:
parent
408db13fd4
commit
6c35046ab2
26 changed files with 1659 additions and 29 deletions
16
test/e2e/helpers/exit-unless-test.js
Normal file
16
test/e2e/helpers/exit-unless-test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
const config = require('./config');
|
||||
const log = require('npmlog');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
if (process.env.NODE_ENV !== 'test' || !fs.existsSync(path.join(__dirname, '..', '..', '..', 'config', 'test.toml'))) {
|
||||
log.error('e2e', 'This script only runs in test and config/test.toml (i.e. a dedicated test database) is present');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (config.app.testserver.enabled !== true) {
|
||||
log.error('e2e', 'This script only runs if the testserver is enabled. Check config/test.toml');
|
||||
process.exit(1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue