Skip to content

Commit

Permalink
Remove type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Sep 5, 2024
1 parent 1830b84 commit 5347466
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/snaps-sdk/src/internals/structs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
validate,
} from '@metamask/superstruct';

import type { GenericSnapElement, BoxElement } from '../jsx';
import type { BoxElement } from '../jsx';
import { Footer, Icon, Text, Button, Box } from '../jsx';
import {
BoxStruct,
Expand Down Expand Up @@ -100,10 +100,7 @@ describe('typedUnion', () => {
}),
]);

const result = create(
{ type: 'Custom' },
coercedStruct,
) as GenericSnapElement;
const result = create({ type: 'Custom' }, coercedStruct);
expect(result.key).toBe('foo');

const result2 = create(
Expand Down

0 comments on commit 5347466

Please sign in to comment.