import React, { Fragment } from "react" import test from "ava" import { createRoot } from "lib/render" import { createProjectBuilder } from "@tscircuit/builder" import { logLayout } from "./utils/log-layout" export const FootprintDefUsage1 = () => { return ( } schX={2} schY={1} > {/* */} ) } export const FootprintDefUsage2 = () => { return ( } schX={2} schY={1} > {/* */} ) } export const FootprintDefUsage3 = () => { return ( ) } test("footprint def usage 1", async (t) => { const pb = createProjectBuilder() const result = await createRoot().render(, pb) await logLayout("footprint def usage 1 example", result) const smtpads = result .filter((r) => r.type === "pcb_smtpad") .sort((a: any, b: any) => a.x - b.x) const [a, b] = smtpads as any t.is(a.x, 0) t.is(b.x, 1) t.is(a.width, 2) t.is(b.width, 2) }) test("footprint def usage 2", async (t) => { const pb = createProjectBuilder() const result = await createRoot().render(, pb) await logLayout("footprint def usage 2 example", result) const smtpads = result .filter((r) => r.type === "pcb_smtpad") .sort((a: any, b: any) => a.x - b.x) const [a, b] = smtpads as any t.is(a.x, 0) t.is(b.x, 1) t.is(a.width, 2) t.is(b.width, 2) }) test("footprint def usage 3", async (t) => { const pb = createProjectBuilder() const result = await createRoot().render(, pb) await logLayout("footprint def usage 3 example", result) const smtpads = result .filter((r) => r.type === "pcb_smtpad") .sort((a: any, b: any) => a.x - b.x) const [a, b] = smtpads as any t.is(a.x, 0) t.is(b.x, 1) t.is(a.width, 2) t.is(b.width, 2) })