Skip to content

Commit aba6054

Browse files
committed
Fix tests for Key
1 parent 00c2081 commit aba6054

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/snaps-sdk/src/jsx/validation.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ import {
6161
} from './validation';
6262

6363
describe('KeyStruct', () => {
64-
it.each(['foo', 42])('validates a key', (value) => {
64+
it.each(['foo', 'bar'])('validates a key', (value) => {
6565
expect(is(value, KeyStruct)).toBe(true);
6666
});
6767

68-
it.each([null, undefined, {}, []])('does not validate "%p"', (value) => {
68+
it.each([42, null, undefined, {}, []])('does not validate "%p"', (value) => {
6969
expect(is(value, KeyStruct)).toBe(false);
7070
});
7171
});

packages/snaps-sdk/src/jsx/validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ import type {
6868
/**
6969
* A struct for the {@link Key} type.
7070
*/
71-
export const KeyStruct: Describe<Key> = nullUnion([string()]);
71+
export const KeyStruct: Describe<Key> = string();
7272

7373
/**
7474
* A struct for the {@link StringElement} type.

0 commit comments

Comments
 (0)