Skip to content

Commit

Permalink
formated
Browse files Browse the repository at this point in the history
  • Loading branch information
AnasSarkiz committed Dec 21, 2024
1 parent d6673ad commit 56105fb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tests/sch/component-wrapper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ test("component wrapper has correct attributes", () => {

circuit.render()
const circuitJson = circuit.getCircuitJson()
const svg = convertCircuitJsonToSchematicSvg(circuitJson as SchematicComponent[])
const svg = convertCircuitJsonToSchematicSvg(
circuitJson as SchematicComponent[],
)

expect(svg).toContain('data-circuit-json-type="schematic_component"')
expect(svg).toContain("data-schematic-component-id")
Expand Down
2 changes: 1 addition & 1 deletion tests/sch/rotated-resistor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test("schematic rotated resistor", () => {
...c,
symbol_name: "boxresistor_vert",
}
} )as AnyCircuitElement[]
}) as AnyCircuitElement[],
),
).toMatchSvgSnapshot(import.meta.path)
})
4 changes: 3 additions & 1 deletion tests/sch/trace-overlap.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ test("schematic trace overlap", () => {
)

expect(
convertCircuitJsonToSchematicSvg(circuit.getCircuitJson() as AnyCircuitElement[]),
convertCircuitJsonToSchematicSvg(
circuit.getCircuitJson() as AnyCircuitElement[],
),
).toMatchSvgSnapshot(import.meta.path)
})
3 changes: 2 additions & 1 deletion tests/sch/unknown-symbol.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test, expect } from "bun:test"
import type { AnyCircuitElement } from "circuit-json"
import { convertCircuitJsonToSchematicSvg } from "lib"
import { getTestFixture } from "tests/fixtures/get-test-fixture"

Expand Down Expand Up @@ -32,7 +33,7 @@ test("schematic rotated resistor", () => {
c.symbol_name = "INTENTIONALLY_NONEXISTENT_SYMBOL!!"
}
return c
}),
}) as AnyCircuitElement[],
),
).toMatchSvgSnapshot(import.meta.path)
})

0 comments on commit 56105fb

Please sign in to comment.