diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-02-01 16:23:16 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-02-01 16:23:16 -0400 |
commit | e17bf53b3f17d8d8aa62869d4fc97883acc5c1fa (patch) | |
tree | 541fab09213494f34c3e859a018ef88ea5be1575 /test | |
parent | e64d210cf0a798ae99bec89ca37cffcc1599411d (diff) |
homepage layout data
Diffstat (limited to 'test')
-rw-r--r-- | test/data-validators.js | 11 |
1 files changed, 11 insertions, 0 deletions
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!')); |