From 08b3b309198038fc1e123db764d6539a21bde0ab Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 20 Apr 2022 18:39:04 -0230 Subject: [PATCH] Add more invalid object tests --- src/sign-typed-data.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sign-typed-data.test.ts b/src/sign-typed-data.test.ts index 2cedcf60..af858e97 100644 --- a/src/sign-typed-data.test.ts +++ b/src/sign-typed-data.test.ts @@ -129,6 +129,11 @@ describe('TYPED_MESSAGE_SCHEMA', () => { const invalidObjects = [undefined, null, 0, 1, [], '', 'test']; for (const invalidObject of invalidObjects) { + // eslint-disable-next-line no-loop-func + it(`should disallow a typed message with value'${invalidObject}'`, () => { + expect(validateTypedMessageSchema(invalidObject as any)).toBe(false); + }); + // eslint-disable-next-line no-loop-func it(`should disallow a domain with value '${invalidObject}'`, () => { const typedMessage = {