From 634b044bc513afd1f9e519d8fdff8bbcf0f99951 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Mon, 28 May 2018 20:31:47 +0200 Subject: [PATCH] nah.sh tests: fix products validation :bug: --- test/nahsh.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/nahsh.js b/test/nahsh.js index 3d0b491d..c7b377af 100644 --- a/test/nahsh.js +++ b/test/nahsh.js @@ -58,10 +58,9 @@ const assertIsKielHbf = (t, s) => { // todo: DRY with assertValidStationProducts // todo: DRY with other tests -const assertValidProducts = (t, p) => { - for (let product of allProducts) { - product = product.product // wat - t.equal(typeof p[product], 'boolean', 'product ' + p + ' must be a boolean') +const assertValidProducts = (t, products) => { + for (let p of allProducts) { + t.equal(typeof products[p.id], 'boolean', `product ${p.id} must be a boolean`) } }