From a034220ffa9276368f567c73bf23f1c2098cb89e Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 31 Mar 2021 07:54:50 +0200 Subject: [PATCH] cambio descripcion del it --- db/tests/vn/item_getBalance.spec.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/db/tests/vn/item_getBalance.spec.js b/db/tests/vn/item_getBalance.spec.js index c72debaf3..2e24d5ce7 100644 --- a/db/tests/vn/item_getBalance.spec.js +++ b/db/tests/vn/item_getBalance.spec.js @@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server'); const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; describe('item_getBalance()', () => { - it(`should return the item balance`, async() => { + it(`should return the item balance ordered by alert level`, async() => { let stmts = []; let params = { @@ -21,12 +21,11 @@ describe('item_getBalance()', () => { let result = await conn.executeStmt(sql); let itemBalance = result[0]; - expect(itemBalance[0].alertLevel >= itemBalance[1].alertLevel).toBeTruthy(); - expect(itemBalance[1].alertLevel >= itemBalance[2].alertLevel).toBeTruthy(); - expect(itemBalance[2].alertLevel >= itemBalance[3].alertLevel).toBeTruthy(); - expect(itemBalance[3].alertLevel >= itemBalance[4].alertLevel).toBeTruthy(); - expect(itemBalance[4].alertLevel >= itemBalance[5].alertLevel).toBeTruthy(); - expect(itemBalance[5].alertLevel >= itemBalance[6].alertLevel).toBeTruthy(); - + expect(itemBalance[0].alertLevel).toBeGreaterThanOrEqual(itemBalance[1].alertLevel); + expect(itemBalance[1].alertLevel).toBeGreaterThanOrEqual(itemBalance[2].alertLevel); + expect(itemBalance[2].alertLevel).toBeGreaterThanOrEqual(itemBalance[3].alertLevel); + expect(itemBalance[3].alertLevel).toBeGreaterThanOrEqual(itemBalance[4].alertLevel); + expect(itemBalance[4].alertLevel).toBeGreaterThanOrEqual(itemBalance[5].alertLevel); + expect(itemBalance[5].alertLevel).toBeGreaterThanOrEqual(itemBalance[6].alertLevel); }); });