Skip to content

Commit 2019a33

Browse files
fix: Duplicate formatConversionTest files (#1798)
* Removed duplicate files * Small fix * Small fix * Removed file * Removed old comment
1 parent ed9434f commit 2019a33

File tree

11 files changed

+40
-413
lines changed

11 files changed

+40
-413
lines changed

packages/xl-multi-column/src/test/conversions/formatConversionTestUtil.ts

Lines changed: 0 additions & 199 deletions
This file was deleted.

packages/xl-multi-column/src/test/conversions/htmlConversion.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import {
99
createExternalHTMLExporter,
1010
createInternalHTMLSerializer,
1111
} from "@blocknote/core";
12-
import { afterEach, beforeEach, describe, expect, it } from "vitest";
13-
1412
import {
1513
addIdsToBlocks,
1614
partialBlocksToBlocksForTesting,
17-
} from "./formatConversionTestUtil.js";
15+
} from "@shared/formatConversionTestUtil.js";
16+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
17+
1818
import { multiColumnSchemaTestCases } from "./testCases.js";
1919

2020
// TODO: code same from @blocknote/core, maybe create separate test util package

packages/xl-multi-column/src/test/conversions/nodeConversion.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
blockToNode,
88
nodeToBlock,
99
} from "@blocknote/core";
10+
import { partialBlockToBlockForTesting } from "@shared/formatConversionTestUtil.js";
1011

11-
import { partialBlockToBlockForTesting } from "./formatConversionTestUtil.js";
1212
import { multiColumnSchemaTestCases } from "./testCases.js";
1313

1414
function addIdsToBlock(block: PartialBlock<any, any, any>) {

packages/xl-multi-column/tsconfig.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,21 @@
1919
"declarationDir": "types",
2020
"composite": true,
2121
"skipLibCheck": true,
22-
"emitDeclarationOnly": true
22+
"emitDeclarationOnly": true,
23+
"paths": {
24+
"@shared/*": ["../../shared/*"]
25+
}
2326
},
24-
"include": ["src"]
27+
"include": ["src"],
28+
"references": [
29+
{
30+
"path": "../core"
31+
},
32+
{
33+
"path": "../react"
34+
},
35+
{
36+
"path": "../../shared"
37+
}
38+
]
2539
}

packages/xl-multi-column/vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ export default defineConfig((conf) => ({
2020
resolve: {
2121
alias:
2222
conf.command === "build"
23-
? ({} as Record<string, string>)
23+
? ({
24+
"@shared": path.resolve(__dirname, "../../shared/"),
25+
} as Record<string, string>)
2426
: ({
27+
"@shared": path.resolve(__dirname, "../../shared/"),
2528
// load live from sources with live reload working
2629
"@blocknote/core": path.resolve(__dirname, "../core/src/"),
2730
} as Record<string, string>),

playground/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default defineConfig((conf) => ({
2424
nesting,
2525
tailwindcss("../packages/shadcn/tailwind.config.js"), // Adjust the path as necessary
2626
auto,
27-
],
27+
] as any,
2828
},
2929
// postcss: "../packages/shadcn/postcss.config.js",
3030
},

tests/src/unit/shared/formatConversion/export/exportTestExecutors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import {
55
InlineContentSchema,
66
StyleSchema,
77
} from "@blocknote/core";
8+
import { addIdsToBlocks } from "@shared/formatConversionTestUtil.js";
89
import { prettify } from "htmlfy";
910
import { expect } from "vitest";
1011

11-
import { addIdsToBlocks } from "../formatConversionTestUtil.js";
1212
import { ExportTestCase } from "./exportTestCase.js";
1313

1414
export const testExportBlockNoteHTML = async <

tests/src/unit/shared/formatConversion/exportParseEquality/exportParseEqualityTestExecutors.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import {
66
nodeToBlock,
77
StyleSchema,
88
} from "@blocknote/core";
9-
import { expect } from "vitest";
10-
11-
// TODO: fix import and add lint rule, or allow?
129
import {
1310
addIdsToBlocks,
1411
partialBlocksToBlocksForTesting,
15-
} from "../formatConversionTestUtil.js";
12+
} from "@shared/formatConversionTestUtil.js";
13+
import { expect } from "vitest";
14+
1615
import { ExportParseEqualityTestCase } from "./exportParseEqualityTestCase.js";
1716

1817
export const testExportParseEqualityBlockNoteHTML = async <

0 commit comments

Comments
 (0)