From fe7a17c10c75d754f456d33b854e7c2cf0e0dfc4 Mon Sep 17 00:00:00 2001 From: Neta London Date: Wed, 31 Jul 2024 14:36:15 +0300 Subject: [PATCH] Fix build errors --- components/src/stores/chip.store.ts | 1 - simulator/src/chip/builder.test.ts | 2 +- simulator/src/chip/builtins/all.test.ts | 2 +- simulator/src/projects/all.test.ts | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/src/stores/chip.store.ts b/components/src/stores/chip.store.ts index c0b31172b..f4f252ad7 100644 --- a/components/src/stores/chip.store.ts +++ b/components/src/stores/chip.store.ts @@ -26,7 +26,6 @@ import { assertExists } from "@davidsouther/jiffies/lib/esm/assert.js"; import { FileSystem } from "@davidsouther/jiffies/lib/esm/fs.js"; import { getBuiltinChip } from "@nand2tetris/simulator/chip/builtins/index.js"; import { TST } from "@nand2tetris/simulator/languages/tst.js"; -import { Action } from "@nand2tetris/simulator/types.js"; import { compare } from "../compare.js"; import { RunSpeed } from "../runbar.js"; import { BaseContext } from "./base.context.js"; diff --git a/simulator/src/chip/builder.test.ts b/simulator/src/chip/builder.test.ts index f6528bda1..405d94131 100644 --- a/simulator/src/chip/builder.test.ts +++ b/simulator/src/chip/builder.test.ts @@ -183,7 +183,7 @@ describe("Chip Builder", () => { Nand(a=in, b=myNand, out=myNand); }`), ); - const foo = await build(chip); + const foo = await build({ parts: chip }); expect(foo).toBeErr(); // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/simulator/src/chip/builtins/all.test.ts b/simulator/src/chip/builtins/all.test.ts index 7960074b4..6ed7f8dd9 100644 --- a/simulator/src/chip/builtins/all.test.ts +++ b/simulator/src/chip/builtins/all.test.ts @@ -25,7 +25,7 @@ describe("All Projects", () => { )("Builtin %s", async (chipName) => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - const ChipProject = ChipProjects[project]?.CHIPS; + const ChipProject = ChipProjects[project]?.CHIPS[chipName]; let hdlFile: string = ChipProject?.[`${chipName}.hdl`]; const tstFile: string = ChipProject?.[`${chipName}.tst`]; const cmpFile: string = ChipProject?.[`${chipName}.cmp`]; diff --git a/simulator/src/projects/all.test.ts b/simulator/src/projects/all.test.ts index 1e426492d..f5a1af306 100644 --- a/simulator/src/projects/all.test.ts +++ b/simulator/src/projects/all.test.ts @@ -51,8 +51,8 @@ describe("Chip Projects", () => { ...ChipProjectsSols[project]!, }; const hdlFile = chipProject.SOLS[chipName]?.[`${chipName}.hdl`]; - const tstFile = chipProject.CHIPS?.[`${chipName}.tst`]; - const cmpFile = chipProject.CHIPS?.[`${chipName}.cmp`]; + const tstFile = chipProject.CHIPS[chipName]?.[`${chipName}.tst`]; + const cmpFile = chipProject.CHIPS[chipName]?.[`${chipName}.cmp`]; expect(hdlFile).toBeDefined(); expect(tstFile).toBeDefined();