From be5aba7b082ed0f50a79f9726592191289817bb2 Mon Sep 17 00:00:00 2001 From: tscircuitbot Date: Tue, 15 Oct 2024 19:31:11 +0000 Subject: [PATCH] formatbot: Automatically format code --- lib/index.test.ts | 34 +++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/index.test.ts b/lib/index.test.ts index a29a8ae..a459ec5 100644 --- a/lib/index.test.ts +++ b/lib/index.test.ts @@ -1,6 +1,10 @@ -import { expect, test, describe } from "bun:test"; -import { convertCircuitJsonToBomRows, convertBomRowsToCsv } from "./index"; -import type { AnyCircuitElement, PcbComponent, SourceComponentBase } from "circuit-json"; +import { expect, test, describe } from "bun:test" +import { convertCircuitJsonToBomRows, convertBomRowsToCsv } from "./index" +import type { + AnyCircuitElement, + PcbComponent, + SourceComponentBase, +} from "circuit-json" describe("convertCircuitJsonToBomRows", () => { test("should convert circuit JSON to BOM rows", async () => { @@ -16,19 +20,19 @@ describe("convertCircuitJsonToBomRows", () => { ftype: "simple_resistor", resistance: 1000, } as SourceComponentBase, - ]; + ] - const bomRows = await convertCircuitJsonToBomRows({ circuitJson }); + const bomRows = await convertCircuitJsonToBomRows({ circuitJson }) - expect(bomRows).toHaveLength(1); + expect(bomRows).toHaveLength(1) expect(bomRows[0]).toEqual({ designator: "R1", comment: "1k", value: "1k", footprint: "", - }); - }); -}); + }) + }) +}) describe("convertBomRowsToCsv", () => { test("should convert BOM rows to CSV", () => { @@ -42,12 +46,12 @@ describe("convertBomRowsToCsv", () => { "JLCPCB Part#": "C17513", }, }, - ]; + ] - const csv = convertBomRowsToCsv(bomRows); + const csv = convertBomRowsToCsv(bomRows) expect(csv).toBe( - "Designator,Comment,Value,Footprint,JLCPCB Part#\r\nR1,1k,1k,0805,C17513" - ); - }); -}); + "Designator,Comment,Value,Footprint,JLCPCB Part#\r\nR1,1k,1k,0805,C17513", + ) + }) +}) diff --git a/package.json b/package.json index 6c4f51e..399da04 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test": "bun test" }, "devDependencies": { - "@biomejs/biome": "^1.9.2", + "@biomejs/biome": "^1.9.3", "@types/bun": "latest", "@types/papaparse": "^5.3.14", "circuit-json": "^0.0.77",