Skip to content

Commit c6339e9

Browse files
committed
fix tests
1 parent c3d2cd0 commit c6339e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tests/unit/translating_mc_json.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { addTypeSpecificValues, translateJSON } from "$lib/text/nbt_or_json";
2-
import type { MinecraftText, TranslateOptions } from "$lib/types";
2+
import { versions, type MinecraftText, type TranslateOptions } from "$lib/types";
33
import type { JSONContent } from "@tiptap/core";
44
import { describe, expect, it } from "vitest";
55
import { readTestDataFile, readTestJSONFile } from "./test_utils";
6+
import { outputVersion } from "$lib/stores";
67

78
describe("translate", () => {
89
it("should return a basic string", () => {
@@ -32,7 +33,6 @@ describe("translate", () => {
3233

3334
const baseOptions: TranslateOptions = {
3435
exportType: "standard",
35-
exportVersion: "new",
3636
optimise: false,
3737
indent: false,
3838
indentSize: 2,
@@ -146,9 +146,9 @@ describe("translate", () => {
146146
const json: JSONContent = (await readTestJSONFile(
147147
"clean/json/interactives_tiptap.json",
148148
)) as JSONContent;
149+
outputVersion.set(versions[0])
149150
const result = translateJSON(json, {
150151
...baseOptions,
151-
exportVersion: "old",
152152
});
153153
expect(JSON.parse(result)).toHaveProperty("[1].clickEvent");
154154
expect(JSON.parse(result)).not.toHaveProperty("[1].click_event");

0 commit comments

Comments
 (0)