From d2cc67e4c5ef5142f3d90f4b99f0fd6b2b125d63 Mon Sep 17 00:00:00 2001 From: Chris Maltby Date: Thu, 19 Sep 2024 12:34:37 +0100 Subject: [PATCH] Move compiler tests one folder up in hierarchy --- .../_files/assets/backgrounds/bg_ad.png | Bin .../_files/assets/backgrounds/bg_bc.png | Bin .../_files/assets/backgrounds/boss.png | Bin .../_files/assets/backgrounds/color_town.png | Bin .../backgrounds/color_town_with_dmg.dmg.png | Bin .../backgrounds/color_town_with_dmg.png | Bin .../assets/backgrounds/forest_clearing.png | Bin .../assets/backgrounds/home_bedroom_night.png | Bin .../_files/assets/backgrounds/mabe_house.png | Bin .../_files/assets/backgrounds/parallax.png | Bin .../_files/assets/backgrounds/scribble.png | Bin .../_files/assets/backgrounds/test_img.png | Bin .../_files/assets/backgrounds/tiles-194.png | Bin .../_files/assets/backgrounds/tiles-386.png | Bin .../backgrounds/village_street_night.png | Bin .../compiler/_files/assets/fonts/gbs-mono.png | Bin .../_files/assets/sprites/sprite_1.png | Bin .../_files/assets/sprites/sprite_2.png | Bin .../_files/assets/sprites/sprite_3.png | Bin .../_files/assets/tilesets/tile_img1.png | Bin .../_files/assets/tilesets/tile_img2.png | Bin .../_files/assets/tilesets/tile_img3.png | Bin .../compiler/_files/assets/ui/ascii.png | Bin .../compiler/_files/assets/ui/cursor.png | Bin .../compiler/_files/assets/ui/emotes.png | Bin .../compiler/_files/assets/ui/frame.png | Bin .../compiler/_files/assets/ui/ui.png | Bin .../compiler/_files/data/projectiles.js | 0 .../compiler/_files/data/script_input_953.s | 0 .../compiler/_files/data/script_input_954.s | 0 .../compiler/_files/data/script_timer_40.s | 0 .../compiler/_files/data/script_timer_54.s | 0 .../compiler/_files/test/autocolor1.png | Bin .../compiler/_files/test/autocolor2.png | Bin .../compiler/_files/test/autocolor3.png | Bin .../compiler/_files/test/color_town.png | Bin .../compiler/_files/test/parallax.png | Bin .../compiler/_files/test/parallax_color.png | Bin .../compiler/_files/test/tileset_0.png | Bin .../compiler/_files/test/tileset_1.png | Bin .../compiler/_files/test/tileset_2.png | Bin .../compiler/_files/test/tileset_3.png | Bin .../compiler/_files/test/tileset_4.png | Bin test/{data => }/compiler/_tmp/.gitignore | 0 test/{data => }/compiler/applyPrefabs.test.ts | 2 +- test/{data => }/compiler/autoColor.test.ts | 0 test/{data => }/compiler/compileData.test.ts | 10 ++++----- .../compiler/compileEntityEvents.test.js | 10 ++++----- .../{data => }/compiler/compileImages.test.ts | 0 .../compiler/determineUsedAssets.test.ts | 4 ++-- test/{data => }/compiler/engine.test.ts | 0 test/{data => }/compiler/gbspack.test.ts | 2 +- .../compiler/gbvmBuildHelpers.test.ts | 20 ++++-------------- .../{data => }/compiler/scriptBuilder.test.ts | 10 ++++----- 54 files changed, 23 insertions(+), 35 deletions(-) rename test/{data => }/compiler/_files/assets/backgrounds/bg_ad.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/bg_bc.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/boss.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/color_town.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/color_town_with_dmg.dmg.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/color_town_with_dmg.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/forest_clearing.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/home_bedroom_night.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/mabe_house.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/parallax.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/scribble.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/test_img.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/tiles-194.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/tiles-386.png (100%) rename test/{data => }/compiler/_files/assets/backgrounds/village_street_night.png (100%) rename test/{data => }/compiler/_files/assets/fonts/gbs-mono.png (100%) rename test/{data => }/compiler/_files/assets/sprites/sprite_1.png (100%) rename test/{data => }/compiler/_files/assets/sprites/sprite_2.png (100%) rename test/{data => }/compiler/_files/assets/sprites/sprite_3.png (100%) rename test/{data => }/compiler/_files/assets/tilesets/tile_img1.png (100%) rename test/{data => }/compiler/_files/assets/tilesets/tile_img2.png (100%) rename test/{data => }/compiler/_files/assets/tilesets/tile_img3.png (100%) rename test/{data => }/compiler/_files/assets/ui/ascii.png (100%) rename test/{data => }/compiler/_files/assets/ui/cursor.png (100%) rename test/{data => }/compiler/_files/assets/ui/emotes.png (100%) rename test/{data => }/compiler/_files/assets/ui/frame.png (100%) rename test/{data => }/compiler/_files/assets/ui/ui.png (100%) rename test/{data => }/compiler/_files/data/projectiles.js (100%) rename test/{data => }/compiler/_files/data/script_input_953.s (100%) rename test/{data => }/compiler/_files/data/script_input_954.s (100%) rename test/{data => }/compiler/_files/data/script_timer_40.s (100%) rename test/{data => }/compiler/_files/data/script_timer_54.s (100%) rename test/{data => }/compiler/_files/test/autocolor1.png (100%) rename test/{data => }/compiler/_files/test/autocolor2.png (100%) rename test/{data => }/compiler/_files/test/autocolor3.png (100%) rename test/{data => }/compiler/_files/test/color_town.png (100%) rename test/{data => }/compiler/_files/test/parallax.png (100%) rename test/{data => }/compiler/_files/test/parallax_color.png (100%) rename test/{data => }/compiler/_files/test/tileset_0.png (100%) rename test/{data => }/compiler/_files/test/tileset_1.png (100%) rename test/{data => }/compiler/_files/test/tileset_2.png (100%) rename test/{data => }/compiler/_files/test/tileset_3.png (100%) rename test/{data => }/compiler/_files/test/tileset_4.png (100%) rename test/{data => }/compiler/_tmp/.gitignore (100%) rename test/{data => }/compiler/applyPrefabs.test.ts (99%) rename test/{data => }/compiler/autoColor.test.ts (100%) rename test/{data => }/compiler/compileData.test.ts (99%) rename test/{data => }/compiler/compileEntityEvents.test.js (97%) rename test/{data => }/compiler/compileImages.test.ts (100%) rename test/{data => }/compiler/determineUsedAssets.test.ts (96%) rename test/{data => }/compiler/engine.test.ts (100%) rename test/{data => }/compiler/gbspack.test.ts (99%) rename test/{data => }/compiler/gbvmBuildHelpers.test.ts (95%) rename test/{data => }/compiler/scriptBuilder.test.ts (99%) diff --git a/test/data/compiler/_files/assets/backgrounds/bg_ad.png b/test/compiler/_files/assets/backgrounds/bg_ad.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/bg_ad.png rename to test/compiler/_files/assets/backgrounds/bg_ad.png diff --git a/test/data/compiler/_files/assets/backgrounds/bg_bc.png b/test/compiler/_files/assets/backgrounds/bg_bc.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/bg_bc.png rename to test/compiler/_files/assets/backgrounds/bg_bc.png diff --git a/test/data/compiler/_files/assets/backgrounds/boss.png b/test/compiler/_files/assets/backgrounds/boss.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/boss.png rename to test/compiler/_files/assets/backgrounds/boss.png diff --git a/test/data/compiler/_files/assets/backgrounds/color_town.png b/test/compiler/_files/assets/backgrounds/color_town.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/color_town.png rename to test/compiler/_files/assets/backgrounds/color_town.png diff --git a/test/data/compiler/_files/assets/backgrounds/color_town_with_dmg.dmg.png b/test/compiler/_files/assets/backgrounds/color_town_with_dmg.dmg.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/color_town_with_dmg.dmg.png rename to test/compiler/_files/assets/backgrounds/color_town_with_dmg.dmg.png diff --git a/test/data/compiler/_files/assets/backgrounds/color_town_with_dmg.png b/test/compiler/_files/assets/backgrounds/color_town_with_dmg.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/color_town_with_dmg.png rename to test/compiler/_files/assets/backgrounds/color_town_with_dmg.png diff --git a/test/data/compiler/_files/assets/backgrounds/forest_clearing.png b/test/compiler/_files/assets/backgrounds/forest_clearing.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/forest_clearing.png rename to test/compiler/_files/assets/backgrounds/forest_clearing.png diff --git a/test/data/compiler/_files/assets/backgrounds/home_bedroom_night.png b/test/compiler/_files/assets/backgrounds/home_bedroom_night.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/home_bedroom_night.png rename to test/compiler/_files/assets/backgrounds/home_bedroom_night.png diff --git a/test/data/compiler/_files/assets/backgrounds/mabe_house.png b/test/compiler/_files/assets/backgrounds/mabe_house.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/mabe_house.png rename to test/compiler/_files/assets/backgrounds/mabe_house.png diff --git a/test/data/compiler/_files/assets/backgrounds/parallax.png b/test/compiler/_files/assets/backgrounds/parallax.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/parallax.png rename to test/compiler/_files/assets/backgrounds/parallax.png diff --git a/test/data/compiler/_files/assets/backgrounds/scribble.png b/test/compiler/_files/assets/backgrounds/scribble.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/scribble.png rename to test/compiler/_files/assets/backgrounds/scribble.png diff --git a/test/data/compiler/_files/assets/backgrounds/test_img.png b/test/compiler/_files/assets/backgrounds/test_img.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/test_img.png rename to test/compiler/_files/assets/backgrounds/test_img.png diff --git a/test/data/compiler/_files/assets/backgrounds/tiles-194.png b/test/compiler/_files/assets/backgrounds/tiles-194.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/tiles-194.png rename to test/compiler/_files/assets/backgrounds/tiles-194.png diff --git a/test/data/compiler/_files/assets/backgrounds/tiles-386.png b/test/compiler/_files/assets/backgrounds/tiles-386.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/tiles-386.png rename to test/compiler/_files/assets/backgrounds/tiles-386.png diff --git a/test/data/compiler/_files/assets/backgrounds/village_street_night.png b/test/compiler/_files/assets/backgrounds/village_street_night.png similarity index 100% rename from test/data/compiler/_files/assets/backgrounds/village_street_night.png rename to test/compiler/_files/assets/backgrounds/village_street_night.png diff --git a/test/data/compiler/_files/assets/fonts/gbs-mono.png b/test/compiler/_files/assets/fonts/gbs-mono.png similarity index 100% rename from test/data/compiler/_files/assets/fonts/gbs-mono.png rename to test/compiler/_files/assets/fonts/gbs-mono.png diff --git a/test/data/compiler/_files/assets/sprites/sprite_1.png b/test/compiler/_files/assets/sprites/sprite_1.png similarity index 100% rename from test/data/compiler/_files/assets/sprites/sprite_1.png rename to test/compiler/_files/assets/sprites/sprite_1.png diff --git a/test/data/compiler/_files/assets/sprites/sprite_2.png b/test/compiler/_files/assets/sprites/sprite_2.png similarity index 100% rename from test/data/compiler/_files/assets/sprites/sprite_2.png rename to test/compiler/_files/assets/sprites/sprite_2.png diff --git a/test/data/compiler/_files/assets/sprites/sprite_3.png b/test/compiler/_files/assets/sprites/sprite_3.png similarity index 100% rename from test/data/compiler/_files/assets/sprites/sprite_3.png rename to test/compiler/_files/assets/sprites/sprite_3.png diff --git a/test/data/compiler/_files/assets/tilesets/tile_img1.png b/test/compiler/_files/assets/tilesets/tile_img1.png similarity index 100% rename from test/data/compiler/_files/assets/tilesets/tile_img1.png rename to test/compiler/_files/assets/tilesets/tile_img1.png diff --git a/test/data/compiler/_files/assets/tilesets/tile_img2.png b/test/compiler/_files/assets/tilesets/tile_img2.png similarity index 100% rename from test/data/compiler/_files/assets/tilesets/tile_img2.png rename to test/compiler/_files/assets/tilesets/tile_img2.png diff --git a/test/data/compiler/_files/assets/tilesets/tile_img3.png b/test/compiler/_files/assets/tilesets/tile_img3.png similarity index 100% rename from test/data/compiler/_files/assets/tilesets/tile_img3.png rename to test/compiler/_files/assets/tilesets/tile_img3.png diff --git a/test/data/compiler/_files/assets/ui/ascii.png b/test/compiler/_files/assets/ui/ascii.png similarity index 100% rename from test/data/compiler/_files/assets/ui/ascii.png rename to test/compiler/_files/assets/ui/ascii.png diff --git a/test/data/compiler/_files/assets/ui/cursor.png b/test/compiler/_files/assets/ui/cursor.png similarity index 100% rename from test/data/compiler/_files/assets/ui/cursor.png rename to test/compiler/_files/assets/ui/cursor.png diff --git a/test/data/compiler/_files/assets/ui/emotes.png b/test/compiler/_files/assets/ui/emotes.png similarity index 100% rename from test/data/compiler/_files/assets/ui/emotes.png rename to test/compiler/_files/assets/ui/emotes.png diff --git a/test/data/compiler/_files/assets/ui/frame.png b/test/compiler/_files/assets/ui/frame.png similarity index 100% rename from test/data/compiler/_files/assets/ui/frame.png rename to test/compiler/_files/assets/ui/frame.png diff --git a/test/data/compiler/_files/assets/ui/ui.png b/test/compiler/_files/assets/ui/ui.png similarity index 100% rename from test/data/compiler/_files/assets/ui/ui.png rename to test/compiler/_files/assets/ui/ui.png diff --git a/test/data/compiler/_files/data/projectiles.js b/test/compiler/_files/data/projectiles.js similarity index 100% rename from test/data/compiler/_files/data/projectiles.js rename to test/compiler/_files/data/projectiles.js diff --git a/test/data/compiler/_files/data/script_input_953.s b/test/compiler/_files/data/script_input_953.s similarity index 100% rename from test/data/compiler/_files/data/script_input_953.s rename to test/compiler/_files/data/script_input_953.s diff --git a/test/data/compiler/_files/data/script_input_954.s b/test/compiler/_files/data/script_input_954.s similarity index 100% rename from test/data/compiler/_files/data/script_input_954.s rename to test/compiler/_files/data/script_input_954.s diff --git a/test/data/compiler/_files/data/script_timer_40.s b/test/compiler/_files/data/script_timer_40.s similarity index 100% rename from test/data/compiler/_files/data/script_timer_40.s rename to test/compiler/_files/data/script_timer_40.s diff --git a/test/data/compiler/_files/data/script_timer_54.s b/test/compiler/_files/data/script_timer_54.s similarity index 100% rename from test/data/compiler/_files/data/script_timer_54.s rename to test/compiler/_files/data/script_timer_54.s diff --git a/test/data/compiler/_files/test/autocolor1.png b/test/compiler/_files/test/autocolor1.png similarity index 100% rename from test/data/compiler/_files/test/autocolor1.png rename to test/compiler/_files/test/autocolor1.png diff --git a/test/data/compiler/_files/test/autocolor2.png b/test/compiler/_files/test/autocolor2.png similarity index 100% rename from test/data/compiler/_files/test/autocolor2.png rename to test/compiler/_files/test/autocolor2.png diff --git a/test/data/compiler/_files/test/autocolor3.png b/test/compiler/_files/test/autocolor3.png similarity index 100% rename from test/data/compiler/_files/test/autocolor3.png rename to test/compiler/_files/test/autocolor3.png diff --git a/test/data/compiler/_files/test/color_town.png b/test/compiler/_files/test/color_town.png similarity index 100% rename from test/data/compiler/_files/test/color_town.png rename to test/compiler/_files/test/color_town.png diff --git a/test/data/compiler/_files/test/parallax.png b/test/compiler/_files/test/parallax.png similarity index 100% rename from test/data/compiler/_files/test/parallax.png rename to test/compiler/_files/test/parallax.png diff --git a/test/data/compiler/_files/test/parallax_color.png b/test/compiler/_files/test/parallax_color.png similarity index 100% rename from test/data/compiler/_files/test/parallax_color.png rename to test/compiler/_files/test/parallax_color.png diff --git a/test/data/compiler/_files/test/tileset_0.png b/test/compiler/_files/test/tileset_0.png similarity index 100% rename from test/data/compiler/_files/test/tileset_0.png rename to test/compiler/_files/test/tileset_0.png diff --git a/test/data/compiler/_files/test/tileset_1.png b/test/compiler/_files/test/tileset_1.png similarity index 100% rename from test/data/compiler/_files/test/tileset_1.png rename to test/compiler/_files/test/tileset_1.png diff --git a/test/data/compiler/_files/test/tileset_2.png b/test/compiler/_files/test/tileset_2.png similarity index 100% rename from test/data/compiler/_files/test/tileset_2.png rename to test/compiler/_files/test/tileset_2.png diff --git a/test/data/compiler/_files/test/tileset_3.png b/test/compiler/_files/test/tileset_3.png similarity index 100% rename from test/data/compiler/_files/test/tileset_3.png rename to test/compiler/_files/test/tileset_3.png diff --git a/test/data/compiler/_files/test/tileset_4.png b/test/compiler/_files/test/tileset_4.png similarity index 100% rename from test/data/compiler/_files/test/tileset_4.png rename to test/compiler/_files/test/tileset_4.png diff --git a/test/data/compiler/_tmp/.gitignore b/test/compiler/_tmp/.gitignore similarity index 100% rename from test/data/compiler/_tmp/.gitignore rename to test/compiler/_tmp/.gitignore diff --git a/test/data/compiler/applyPrefabs.test.ts b/test/compiler/applyPrefabs.test.ts similarity index 99% rename from test/data/compiler/applyPrefabs.test.ts rename to test/compiler/applyPrefabs.test.ts index da274a905..acbd6aede 100644 --- a/test/data/compiler/applyPrefabs.test.ts +++ b/test/compiler/applyPrefabs.test.ts @@ -14,7 +14,7 @@ import { dummySceneResource, dummyTriggerPrefabResource, dummyTriggerResource, -} from "../../dummydata"; +} from "../dummydata"; describe("applyPrefabs", () => { it("should apply actor prefabs correctly", () => { diff --git a/test/data/compiler/autoColor.test.ts b/test/compiler/autoColor.test.ts similarity index 100% rename from test/data/compiler/autoColor.test.ts rename to test/compiler/autoColor.test.ts diff --git a/test/data/compiler/compileData.test.ts b/test/compiler/compileData.test.ts similarity index 99% rename from test/data/compiler/compileData.test.ts rename to test/compiler/compileData.test.ts index bdd29ce1b..a4c95c8d1 100644 --- a/test/data/compiler/compileData.test.ts +++ b/test/compiler/compileData.test.ts @@ -2,16 +2,16 @@ import compile, { precompileBackgrounds, precompileScenes, -} from "../../../src/lib/compiler/compileData"; +} from "../../src/lib/compiler/compileData"; import { compileSceneProjectiles, PrecompiledBackground, PrecompiledScene, PrecompiledSprite, -} from "../../../src/lib/compiler/generateGBVMData"; -import { EVENT_TEXT, EVENT_IF_TRUE } from "../../../src/consts"; +} from "../../src/lib/compiler/generateGBVMData"; +import { EVENT_TEXT, EVENT_IF_TRUE } from "../../src/consts"; import { projectileStateTest } from "./_files/data/projectiles"; -import { getTestScriptHandlers } from "../../getTestScriptHandlers"; +import { getTestScriptHandlers } from "../getTestScriptHandlers"; import { ProjectResources } from "shared/lib/resources/types"; import { BackgroundData, @@ -23,7 +23,7 @@ import { dummyBackground, dummyScene, dummyScriptEvent, -} from "../../dummydata"; +} from "../dummydata"; import os from "os"; test("should take into account state value when building projectiles", () => { diff --git a/test/data/compiler/compileEntityEvents.test.js b/test/compiler/compileEntityEvents.test.js similarity index 97% rename from test/data/compiler/compileEntityEvents.test.js rename to test/compiler/compileEntityEvents.test.js index 6c41ba0bd..c2f40b1d8 100644 --- a/test/data/compiler/compileEntityEvents.test.js +++ b/test/compiler/compileEntityEvents.test.js @@ -1,9 +1,9 @@ -import compileEntityEvents from "../../../src/lib/compiler/compileEntityEvents"; -import { EVENT_END, EVENT_TEXT, EVENT_IF_TRUE } from "../../../src/consts"; -import { getDummyCompiledFont } from "../../dummydata"; -import { getTestScriptHandlers } from "../../getTestScriptHandlers"; +import compileEntityEvents from "../../src/lib/compiler/compileEntityEvents"; +import { EVENT_END, EVENT_TEXT, EVENT_IF_TRUE } from "../../src/consts"; +import { getDummyCompiledFont } from "../dummydata"; +import { getTestScriptHandlers } from "../getTestScriptHandlers"; -jest.mock("../../../src/consts"); +jest.mock("../../src/consts"); test("should compile empty events", async () => { const scriptEventHandlers = await getTestScriptHandlers(); diff --git a/test/data/compiler/compileImages.test.ts b/test/compiler/compileImages.test.ts similarity index 100% rename from test/data/compiler/compileImages.test.ts rename to test/compiler/compileImages.test.ts diff --git a/test/data/compiler/determineUsedAssets.test.ts b/test/compiler/determineUsedAssets.test.ts similarity index 96% rename from test/data/compiler/determineUsedAssets.test.ts rename to test/compiler/determineUsedAssets.test.ts index 0cd27ea07..1ada98e19 100644 --- a/test/data/compiler/determineUsedAssets.test.ts +++ b/test/compiler/determineUsedAssets.test.ts @@ -1,7 +1,7 @@ import { determineUsedAssets } from "lib/compiler/precompile/determineUsedAssets"; import { CustomEvent, FontData } from "shared/lib/entities/entitiesTypes"; -import { getTestScriptHandlers } from "../../getTestScriptHandlers"; -import { dummyProjectResources, dummySceneResource } from "../../dummydata"; +import { getTestScriptHandlers } from "../getTestScriptHandlers"; +import { dummyProjectResources, dummySceneResource } from "../dummydata"; import { FontResource, ProjectResources, diff --git a/test/data/compiler/engine.test.ts b/test/compiler/engine.test.ts similarity index 100% rename from test/data/compiler/engine.test.ts rename to test/compiler/engine.test.ts diff --git a/test/data/compiler/gbspack.test.ts b/test/compiler/gbspack.test.ts similarity index 99% rename from test/data/compiler/gbspack.test.ts rename to test/compiler/gbspack.test.ts index 4b5852af6..12a6401d9 100644 --- a/test/data/compiler/gbspack.test.ts +++ b/test/compiler/gbspack.test.ts @@ -8,7 +8,7 @@ import { replaceBank, toCartSize, toOutputFilename, -} from "../../../src/lib/compiler/gbspack"; +} from "../../src/lib/compiler/gbspack"; describe("Parse", () => { it("should parse area size", () => { diff --git a/test/data/compiler/gbvmBuildHelpers.test.ts b/test/compiler/gbvmBuildHelpers.test.ts similarity index 95% rename from test/data/compiler/gbvmBuildHelpers.test.ts rename to test/compiler/gbvmBuildHelpers.test.ts index 83cfac455..fcfe77d1c 100644 --- a/test/data/compiler/gbvmBuildHelpers.test.ts +++ b/test/compiler/gbvmBuildHelpers.test.ts @@ -127,17 +127,11 @@ _scene_1_init:: it("should give equal output for functionally identical scripts", async () => { const input1 = await readFile( - path.resolve( - __dirname, - "../../data/compiler/_files/data/script_input_953.s" - ), + path.resolve(__dirname, "_files/data/script_input_953.s"), "utf8" ); const input2 = await readFile( - path.resolve( - __dirname, - "../../data/compiler/_files/data/script_input_954.s" - ), + path.resolve(__dirname, "_files/data/script_input_954.s"), "utf8" ); @@ -148,17 +142,11 @@ _scene_1_init:: it("should give equal output for functionally more identical scripts", async () => { const input1 = await readFile( - path.resolve( - __dirname, - "../../data/compiler/_files/data/script_timer_40.s" - ), + path.resolve(__dirname, "_files/data/script_timer_40.s"), "utf8" ); const input2 = await readFile( - path.resolve( - __dirname, - "../../data/compiler/_files/data/script_timer_54.s" - ), + path.resolve(__dirname, "_files/data/script_timer_54.s"), "utf8" ); diff --git a/test/data/compiler/scriptBuilder.test.ts b/test/compiler/scriptBuilder.test.ts similarity index 99% rename from test/data/compiler/scriptBuilder.test.ts rename to test/compiler/scriptBuilder.test.ts index 52b32160d..be7f8cb83 100644 --- a/test/data/compiler/scriptBuilder.test.ts +++ b/test/compiler/scriptBuilder.test.ts @@ -1,18 +1,18 @@ -import { PrecompiledScene } from "../../../src/lib/compiler/generateGBVMData"; +import { PrecompiledScene } from "../../src/lib/compiler/generateGBVMData"; import ScriptBuilder, { ScriptBuilderOptions, -} from "../../../src/lib/compiler/scriptBuilder"; +} from "../../src/lib/compiler/scriptBuilder"; import { CustomEvent, ScriptEvent, -} from "../../../src/shared/lib/entities/entitiesTypes"; +} from "../../src/shared/lib/entities/entitiesTypes"; import { dummyActorNormalized, dummyPrecompiledBackground, dummyPrecompiledSpriteSheet, getDummyCompiledFont, -} from "../../dummydata"; -import { getTestScriptHandlers } from "../../getTestScriptHandlers"; +} from "../dummydata"; +import { getTestScriptHandlers } from "../getTestScriptHandlers"; test("Should be able to set active actor to player", async () => { const output: string[] = [];