2018-09-26 13:48:33 +00:00
|
|
|
process.on('warning', warning => {
|
|
|
|
console.log(warning.name);
|
|
|
|
console.log(warning.message);
|
|
|
|
console.log(warning.stack);
|
|
|
|
});
|
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
let verbose = false;
|
2018-09-26 13:48:33 +00:00
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
if (process.argv[2] === '--v')
|
2018-09-26 13:48:33 +00:00
|
|
|
verbose = true;
|
|
|
|
|
2019-02-13 07:34:40 +00:00
|
|
|
let app = require(`vn-loopback/server/server`);
|
|
|
|
app.boot();
|
|
|
|
loopbackApp = 'vn-loopback/server/server';
|
2018-09-26 13:48:33 +00:00
|
|
|
|
2018-12-19 07:42:07 +00:00
|
|
|
let Jasmine = require('jasmine');
|
|
|
|
let jasmine = new Jasmine();
|
|
|
|
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
|
2018-09-26 13:48:33 +00:00
|
|
|
|
|
|
|
let serviceSpecs = [
|
2019-03-04 07:13:09 +00:00
|
|
|
'./tests/**/*[sS]pec.js'
|
2018-09-26 13:48:33 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
jasmine.loadConfig({
|
2019-03-04 07:13:09 +00:00
|
|
|
spec_dir: 'db',
|
2018-09-26 13:48:33 +00:00
|
|
|
spec_files: serviceSpecs,
|
2018-12-20 16:05:30 +00:00
|
|
|
helpers: []
|
2018-09-26 13:48:33 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
jasmine.addReporter(new SpecReporter({
|
|
|
|
spec: {
|
|
|
|
// displayStacktrace: 'summary',
|
|
|
|
displaySuccessful: verbose,
|
|
|
|
displayFailedSpec: true,
|
|
|
|
displaySpecDuration: true
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
|
|
|
|
jasmine.execute();
|