Skip to content

Commit 57a01f2

Browse files
committed
test: fixes for test running
1 parent d9c85f1 commit 57a01f2

6 files changed

Lines changed: 29 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"unrs-resolver"
3636
]
3737
},
38-
"packageManager": "pnpm@10.18.2+sha512.9fb969fa749b3ade6035e0f109f0b8a60b5d08a1a87fdf72e337da90dcc93336e2280ca4e44f2358a649b83c17959e9993e777c2080879f3801e6f0d999ad3dd",
38+
"packageManager": "pnpm@10.23.0+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b",
3939
"private": true,
4040
"scripts": {
4141
"dev": "nx run @blocknote/example-editor:dev",

packages/core/src/editor/managers/ExtensionManager/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class ExtensionManager {
5858
// If the extension has an init function, we can initialize it, otherwise, it is already added to the editor
5959
if (extension.mount) {
6060
// We create an abort controller for each extension, so that we can abort the extension when the editor is unmounted
61-
const abortController = new AbortController();
61+
const abortController = new window.AbortController();
6262
const unmountCallback = extension.mount({
6363
dom: editor.prosemirrorView.dom,
6464
root: editor.prosemirrorView.root,

packages/server-util/src/context/ServerBlockNoteEditor.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,15 @@ export class ServerBlockNoteEditor<
297297
{},
298298
createElement(BlockNoteViewRaw<any, any, any>, {
299299
editor: this.editor,
300+
// Skip UI components to avoid rendering them in the server environment
301+
formattingToolbar: false,
302+
linkToolbar: false,
303+
slashMenu: false,
304+
emojiPicker: false,
305+
sideMenu: false,
306+
filePanel: false,
307+
tableHandles: false,
308+
comments: false,
300309
}),
301310
),
302311
);

packages/xl-docx-exporter/vite.config.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const deps = Object.keys({
1313
// https://vitejs.dev/config/
1414
export default defineConfig((conf) => ({
1515
test: {
16+
environment: "jsdom",
1617
setupFiles: ["./vitestSetup.ts"],
1718
},
1819
plugins: [webpackStats() as any],
@@ -28,6 +29,10 @@ export default defineConfig((conf) => ({
2829
// load live from sources with live reload working
2930
"@blocknote/core": path.resolve(__dirname, "../core/src/"),
3031
"@blocknote/react": path.resolve(__dirname, "../react/src/"),
32+
"@blocknote/xl-multi-column": path.resolve(
33+
__dirname,
34+
"../xl-multi-column/src/",
35+
),
3136
} as Record<string, string>),
3237
},
3338
server: {
@@ -59,7 +64,11 @@ export default defineConfig((conf) => ({
5964
return true;
6065
}
6166

62-
if (source.startsWith("prosemirror-")) {
67+
if (
68+
source.startsWith("prosemirror-") ||
69+
source.startsWith("@tiptap/") ||
70+
source.startsWith("@blocknote/")
71+
) {
6372
return true;
6473
}
6574

packages/xl-odt-exporter/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ export default defineConfig((conf) => ({
2727
"@shared": path.resolve(__dirname, "../../shared/"),
2828
"@blocknote/core": path.resolve(__dirname, "../core/src/"),
2929
"@blocknote/react": path.resolve(__dirname, "../react/src/"),
30+
"@blocknote/xl-multi-column": path.resolve(
31+
__dirname,
32+
"../xl-multi-column/src/",
33+
),
3034
} as Record<string, string>),
3135
},
3236
build: {

packages/xl-pdf-exporter/vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ export default defineConfig((conf) => ({
3535
// load live from sources with live reload working
3636
"@blocknote/core": path.resolve(__dirname, "../core/src/"),
3737
"@blocknote/react": path.resolve(__dirname, "../react/src/"),
38+
"@blocknote/xl-multi-column": path.resolve(
39+
__dirname,
40+
"../xl-multi-column/src/",
41+
),
3842
} as Record<string, string>),
3943
},
4044
server: {

0 commit comments

Comments
 (0)