Skip to content

Commit f5e74f6

Browse files
committed
fix: resolve test failures from stale dist and missing source aliases
- Add @blocknote/mantine and @blocknote/server-util to tests/vite.config.ts aliases so all unit tests resolve from source, never needing a dist build - Rebuild stale tsdown-generated dist files (ariakit, mantine, shadcn, xl-ai, xl-ai-server, xl-multi-column) so Next.js serverUtil test can find mantine - Fix TestExecutor type to accept void | Promise<void> — sync test executors are valid but the type was requiring Promise<void>, causing tsgo TS2322 errors
1 parent 6487f07 commit f5e74f6

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

tests/src/unit/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ export type TestExecutor<
1010
B extends BlockSchema,
1111
I extends InlineContentSchema,
1212
S extends StyleSchema,
13-
> = (editor: BlockNoteEditor<B, I, S>, testCase: TestCase) => Promise<void>;
13+
> = (
14+
editor: BlockNoteEditor<B, I, S>,
15+
testCase: TestCase,
16+
) => void | Promise<void>;
1417

1518
export type TestInstance<
1619
TestCase,

tests/vite.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ export default defineConfig(
4949
__dirname,
5050
"../packages/react/src/",
5151
),
52+
"@blocknote/mantine": path.resolve(
53+
__dirname,
54+
"../packages/mantine/src/",
55+
),
56+
"@blocknote/server-util": path.resolve(
57+
__dirname,
58+
"../packages/server-util/src/",
59+
),
5260
} as Record<string, string>),
5361
},
5462
}) as UserConfig,

0 commit comments

Comments
 (0)