ant-design/tests/shared/demoTestContext.ts
2023-05-06 15:49:37 +08:00

13 lines
400 B
TypeScript

/* eslint-disable import/prefer-default-export */
import type { TriggerProps } from 'rc-trigger';
import * as React from 'react';
// We export context here is to avoid testing-lib inject `afterEach` in `tests/index.test.js`
// Which breaks the circle deps
export const TriggerMockContext = React.createContext<
| (Partial<TriggerProps> & {
mock?: boolean;
})
| undefined
>(undefined);