nah.sh tests: fix products validation 🐛

This commit is contained in:
Jannis R 2018-05-28 20:31:47 +02:00
parent 57f3cdb7e0
commit 634b044bc5
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -58,10 +58,9 @@ const assertIsKielHbf = (t, s) => {
// todo: DRY with assertValidStationProducts // todo: DRY with assertValidStationProducts
// todo: DRY with other tests // todo: DRY with other tests
const assertValidProducts = (t, p) => { const assertValidProducts = (t, products) => {
for (let product of allProducts) { for (let p of allProducts) {
product = product.product // wat t.equal(typeof products[p.id], 'boolean', `product ${p.id} must be a boolean`)
t.equal(typeof p[product], 'boolean', 'product ' + p + ' must be a boolean')
} }
} }