Skip to content

Commit

Permalink
Add more invalid object tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gudahtt committed Apr 20, 2022
1 parent b5f0d87 commit 08b3b30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sign-typed-data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 08b3b30

Please sign in to comment.