From e17bf53b3f17d8d8aa62869d4fc97883acc5c1fa Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 1 Feb 2022 16:23:16 -0400 Subject: homepage layout data --- test/data-validators.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/data-validators.js b/test/data-validators.js index feec127a..739333a3 100644 --- a/test/data-validators.js +++ b/test/data-validators.js @@ -4,6 +4,7 @@ import { showAggregate } from '../src/util/sugar.js'; import { // Basic types isBoolean, + isCountingNumber, isNumber, isString, isStringNonEmpty, @@ -60,6 +61,16 @@ test('isNumber', t => { t.throws(() => isNumber(true), TypeError); }); +test('isCountingNumber', t => { + t.plan(6); + t.ok(isCountingNumber(3)); + t.ok(isCountingNumber(1)); + t.throws(() => isCountingNumber(1.75), TypeError); + t.throws(() => isCountingNumber(0), TypeError); + t.throws(() => isCountingNumber(-1), TypeError); + t.throws(() => isCountingNumber('612'), TypeError); +}); + test('isString', t => { t.plan(3); t.ok(isString('hello!')); -- cgit 1.3.0-6-gf8a5