1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00
portainer/app/setup-tests/mock-codemirror.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
605 B
TypeScript
Raw Permalink Normal View History

export function mockCodeMirror() {
vi.mock('@uiw/react-codemirror', () => ({
__esModule: true,
default: () => <div />,
oneDarkHighlightStyle: {},
keymap: {
of: () => ({}),
},
}));
vi.mock('react-codemirror-merge', () => {
const components = {
MergeView: () => <div />,
Original: () => <div />,
Modified: () => <div />,
};
return {
__esModule: true,
default: components,
...components,
};
});
vi.mock('yaml-schema', () => ({
yamlSchema: () => [],
validation: () => ({
of: () => ({}),
}),
}));
}