From 902ebbafb7cfb56f7a878d33cf94e5708861ff4a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Sep 2023 19:22:52 -0300 Subject: test: various error whitespace cleanup --- .../withResultOfAvailabilityCheck.js | 63 +++++++--------------- 1 file changed, 20 insertions(+), 43 deletions(-) (limited to 'test/unit/data/composite/common-utilities/withResultOfAvailabilityCheck.js') diff --git a/test/unit/data/composite/common-utilities/withResultOfAvailabilityCheck.js b/test/unit/data/composite/common-utilities/withResultOfAvailabilityCheck.js index dacf60f0..50c127d3 100644 --- a/test/unit/data/composite/common-utilities/withResultOfAvailabilityCheck.js +++ b/test/unit/data/composite/common-utilities/withResultOfAvailabilityCheck.js @@ -3,8 +3,8 @@ import t from 'tap'; import { compositeFrom, continuationSymbol, - withResultOfAvailabilityCheck, input, + withResultOfAvailabilityCheck, } from '#composite'; const composite = compositeFrom({ @@ -115,12 +115,9 @@ t.test(`withResultOfAvailabilityCheck: validate static inputs`, t => { t.throws( () => withResultOfAvailabilityCheck({}), - { - message: `Errors in input options passed to withResultOfAvailabilityCheck`, - errors: [ - {message: `Required these inputs: from`} - ], - }); + {message: `Errors in input options passed to withResultOfAvailabilityCheck`, errors: [ + {message: `Required these inputs: from`}, + ]}); t.doesNotThrow(() => withResultOfAvailabilityCheck({ @@ -139,24 +136,18 @@ t.test(`withResultOfAvailabilityCheck: validate static inputs`, t => { from: 'foo', mode: input.value('invalid'), }), - { - message: `Errors in input options passed to withResultOfAvailabilityCheck`, - errors: [ - {message: `mode: Expected one of null empty falsy, got invalid`}, - ], - }); + {message: `Errors in input options passed to withResultOfAvailabilityCheck`, errors: [ + {message: `mode: Expected one of null empty falsy, got invalid`}, + ]}); t.throws(() => withResultOfAvailabilityCheck({ from: input.value(null), mode: input.value(null), }), - { - message: `Errors in input options passed to withResultOfAvailabilityCheck`, - errors: [ - {message: `mode: Expected a value, got null`}, - ], - }); + {message: `Errors in input options passed to withResultOfAvailabilityCheck`, errors: [ + {message: `mode: Expected a value, got null`}, + ]}); }); t.test(`withResultOfAvailabilityCheck: validate dynamic inputs`, t => { @@ -167,34 +158,20 @@ t.test(`withResultOfAvailabilityCheck: validate dynamic inputs`, t => { from: 'apple', mode: 'banana', }), - { - message: `Error computing composition`, - cause: { - message: `Error computing composition withResultOfAvailabilityCheck`, - cause: { - message: `Errors in input values provided to withResultOfAvailabilityCheck`, - errors: [ - {message: `mode: Expected one of null empty falsy, got banana`}, - ], - }, - }, - }); + {message: `Error computing composition`, cause: + {message: `Error computing composition withResultOfAvailabilityCheck`, cause: + {message: `Errors in input values provided to withResultOfAvailabilityCheck`, errors: [ + {message: `mode: Expected one of null empty falsy, got banana`}, + ]}}}); t.throws( () => composite.expose.compute({ from: null, mode: null, }), - { - message: `Error computing composition`, - cause: { - message: `Error computing composition withResultOfAvailabilityCheck`, - cause: { - message: `Errors in input values provided to withResultOfAvailabilityCheck`, - errors: [ - {message: `mode: Expected a value, got null`}, - ], - }, - }, - }); + {message: `Error computing composition`, cause: + {message: `Error computing composition withResultOfAvailabilityCheck`, cause: + {message: `Errors in input values provided to withResultOfAvailabilityCheck`, errors: [ + {message: `mode: Expected a value, got null`}, + ]}}}); }); -- cgit 1.3.0-6-gf8a5