Skip to content

Commit

Permalink
test: mock frame and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
devisscher committed Sep 18, 2023
1 parent b498459 commit d576af1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/utilities/react-testing.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {ReactNode} from 'react';
import {
createMount,
mount,
Expand All @@ -15,6 +15,11 @@ import type {Field} from '../../src';

export {createMount, mount, ReactTestingElement, CustomRoot};

jest.mock('@shopify/polaris', () => ({
...jest.requireActual('@shopify/polaris'),
Frame: ({children}: {children?: ReactNode}) => <div>{children}</div>,
}));

export const mountWithApp = (
component: React.ReactElement<any, string | React.JSXElementConstructor<any>>,
options?: DiscountAppComponentsTestProviderProps,
Expand Down

0 comments on commit d576af1

Please sign in to comment.