Skip to content

Commit

Permalink
More TS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed Mar 12, 2024
1 parent da3f538 commit a4586c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/documentation/common/DocumentationContent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
*/
import { ImageProps } from "@chakra-ui/react";
import { render } from "@testing-library/react";
import { vi } from "vitest";
import { PortableText } from "../../common/sanity";
import DocumentationContent from "./DocumentationContent";
import { vi } from "vitest";
import React from "react";

vi.mock("@chakra-ui/image", () => ({
Image: ({ src, w, h }: ImageProps) => (
Expand Down
7 changes: 4 additions & 3 deletions src/editor/codemirror/dnd-decorations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,12 @@ const decorationDetails = (plugin: DndDecorationsViewPlugin) => {
};

const createView = (doc: Text = Text.of([""])): EditorView => {
return {
const view: Partial<EditorView> = {
visibleRanges: [{ from: 0, to: doc.length - 1 }],
state: EditorState.create({ doc }),
dispatch: vi.fn(),
} as Partial<EditorView> as unknown as EditorView;
dispatch: vi.fn() as any,
};
return view as unknown as EditorView;
};

/**
Expand Down

0 comments on commit a4586c5

Please sign in to comment.