diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-01-03 20:31:13 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-01-03 20:35:09 -0400 |
commit | cf70ea90286a6de7c9d4dad2aa33a0b8bec4a9ae (patch) | |
tree | ea31f9fc3bb0be72eab03715b889ffa80b6c7a1f /test/unit | |
parent | d83f4834af5ac18759c2e2c3ad4bb2c7e4900bee (diff) |
validators: oneOf -> anyOf
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/data/things/validators.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/unit/data/things/validators.js b/test/unit/data/things/validators.js index aa56a10e..27d5f4f1 100644 --- a/test/unit/data/things/validators.js +++ b/test/unit/data/things/validators.js @@ -30,7 +30,7 @@ import { validateReferenceList, // Compositional utilities - oneOf, + anyOf, } from '#validators'; function test(t, msg, fn) { @@ -288,10 +288,10 @@ test(t, 'validateReferenceList', t => { t.ok(caughtError.errors[1] instanceof TypeError); }); -test(t, 'oneOf', t => { +test(t, 'anyOf', t => { t.plan(11); - const isStringOrNumber = oneOf(isString, isNumber); + const isStringOrNumber = anyOf(isString, isNumber); t.ok(isStringOrNumber('hello world')); t.ok(isStringOrNumber(42)); @@ -302,7 +302,7 @@ test(t, 'oneOf', t => { throw mockError; }; - const isStringOrGetRekt = oneOf(isString, neverSucceeds); + const isStringOrGetRekt = anyOf(isString, neverSucceeds); t.ok(isStringOrGetRekt('phew!')); |