cambio descripcion del it
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2021-03-31 07:54:50 +02:00
parent 3cb0859f85
commit a034220ffa
1 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
describe('item_getBalance()', () => { describe('item_getBalance()', () => {
it(`should return the item balance`, async() => { it(`should return the item balance ordered by alert level`, async() => {
let stmts = []; let stmts = [];
let params = { let params = {
@ -21,12 +21,11 @@ describe('item_getBalance()', () => {
let result = await conn.executeStmt(sql); let result = await conn.executeStmt(sql);
let itemBalance = result[0]; let itemBalance = result[0];
expect(itemBalance[0].alertLevel >= itemBalance[1].alertLevel).toBeTruthy(); expect(itemBalance[0].alertLevel).toBeGreaterThanOrEqual(itemBalance[1].alertLevel);
expect(itemBalance[1].alertLevel >= itemBalance[2].alertLevel).toBeTruthy(); expect(itemBalance[1].alertLevel).toBeGreaterThanOrEqual(itemBalance[2].alertLevel);
expect(itemBalance[2].alertLevel >= itemBalance[3].alertLevel).toBeTruthy(); expect(itemBalance[2].alertLevel).toBeGreaterThanOrEqual(itemBalance[3].alertLevel);
expect(itemBalance[3].alertLevel >= itemBalance[4].alertLevel).toBeTruthy(); expect(itemBalance[3].alertLevel).toBeGreaterThanOrEqual(itemBalance[4].alertLevel);
expect(itemBalance[4].alertLevel >= itemBalance[5].alertLevel).toBeTruthy(); expect(itemBalance[4].alertLevel).toBeGreaterThanOrEqual(itemBalance[5].alertLevel);
expect(itemBalance[5].alertLevel >= itemBalance[6].alertLevel).toBeTruthy(); expect(itemBalance[5].alertLevel).toBeGreaterThanOrEqual(itemBalance[6].alertLevel);
}); });
}); });