From 89441a287088e20239c9e93f461eb75cee8ff662 Mon Sep 17 00:00:00 2001 From: Cris Mihalache Date: Fri, 22 Dec 2023 13:56:04 +0100 Subject: [PATCH] feature: test InvalidInputError accesors, for full test coverage --- src/tests/errors/invalid_input.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tests/errors/invalid_input.ts b/src/tests/errors/invalid_input.ts index a26c6e4..476ef31 100644 --- a/src/tests/errors/invalid_input.ts +++ b/src/tests/errors/invalid_input.ts @@ -17,6 +17,13 @@ describe('errors:invalid_input', () => { const err = new InvalidInputError(input, detail) - expect(err.message).to.include(detail) + expect(err.detail).to.equal(detail) + }) + + it('provides access to the input string passed to the constructor', () => { + const input = 'test-input' + const err = new InvalidInputError(input) + + expect(err.input).to.equal(input) }) })