Skip to content

Commit

Permalink
Add soup conversion test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-balitskyi committed Jul 10, 2024
1 parent edade45 commit 36f3777
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/convert-to-soup-tests/c4355039-to-soup.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { it } from "bun:test"
import { logSoup } from "@tscircuit/log-soup"
import C4355039EasyEdaJson from "../assets/C4355039.raweasy.json"
import { EasyEdaJsonSchema } from "lib/schemas/easy-eda-json-schema"
import { convertEasyEdaJsonToTscircuitSoupJson } from "lib/convert-easyeda-json-to-tscircuit-soup-json"
import type { AnySoupElement } from "@tscircuit/soup"

it("should parse easyeda json for c4355039 and convert to tscircuit soup", async () => {
const parsedJson = EasyEdaJsonSchema.parse(C4355039EasyEdaJson)
console.log("🚀 ~ parsedJson:", parsedJson)
const soupElements = convertEasyEdaJsonToTscircuitSoupJson(parsedJson)

await logSoup("easyeda c4355039 to soup", soupElements as AnySoupElement[])
})

0 comments on commit 36f3777

Please sign in to comment.