data base test refactor and fix with app boot

This commit is contained in:
Carlos Jimenez Ruiz 2019-02-13 08:34:40 +01:00
parent fb4a4cd3de
commit 7586024422
7 changed files with 9 additions and 7 deletions

View File

@ -9,7 +9,9 @@ let verbose = false;
if (process.argv[2] === '--v') if (process.argv[2] === '--v')
verbose = true; verbose = true;
loopbackApp = `vn-loopback/server/server`; let app = require(`vn-loopback/server/server`);
app.boot();
loopbackApp = 'vn-loopback/server/server';
let Jasmine = require('jasmine'); let Jasmine = require('jasmine');
let jasmine = new Jasmine(); let jasmine = new Jasmine();

View File

@ -1,4 +1,4 @@
const app = require(`${loopbackApp}`); const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('buyUltimate()', () => { describe('buyUltimate()', () => {

View File

@ -1,4 +1,4 @@
const app = require(`${loopbackApp}`); const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('buyUltimateFromInterval()', () => { describe('buyUltimateFromInterval()', () => {

View File

@ -1,4 +1,4 @@
const app = require(`${loopbackApp}`); const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('logAddWithUser()', () => { describe('logAddWithUser()', () => {

View File

@ -1,4 +1,4 @@
const app = require(`${loopbackApp}`); const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('ticket ticketCalculateClon()', () => { describe('ticket ticketCalculateClon()', () => {

View File

@ -1,4 +1,4 @@
const app = require(`${loopbackApp}`); const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('ticketComponentUpdateSale()', () => { describe('ticketComponentUpdateSale()', () => {

View File

@ -1,4 +1,4 @@
const app = require(`${loopbackApp}`); const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('ticket ticketCreateWithUser()', () => { describe('ticket ticketCreateWithUser()', () => {