From 1f13f68926d552e976fb19acaa03ed9b56b51877 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 22 Aug 2018 19:33:38 +0200 Subject: [PATCH] allow line.fahrtNr of null :green_heart: --- test/lib/validators.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/lib/validators.js b/test/lib/validators.js index 9aa8365f..9a1b4efc 100644 --- a/test/lib/validators.js +++ b/test/lib/validators.js @@ -83,8 +83,11 @@ const createValidateLine = (cfg) => { const validateLine = (val, line, name = 'line') => { defaultValidators.line(val, line, name) - a.strictEqual(typeof line.fahrtNr, 'string', name + ' must be string') - a.ok(line.fahrtNr, name + ' must not be empty') + const msg = name + '.fahrtNr must be ' + if (line.fahrtNr !== null) { + a.strictEqual(typeof line.fahrtNr, 'string', msg + 'a string') + a.ok(line.fahrtNr, msg + ' be empty') + } a.ok(validLineModes.includes(line.mode), name + '.mode is invalid') }