@@ -7,6 +7,31 @@ test("sot23", () => {
77 const svgContent = convertCircuitJsonToPcbSvg ( circuitJson )
88 expect ( svgContent ) . toMatchSvgSnapshot ( import . meta. path , "sot23" )
99} )
10+
11+ test ( "sot-23 legacy alias" , ( ) => {
12+ const circuitJson = fp . string ( "sot-23" ) . circuitJson ( )
13+ expect ( circuitJson ) . toEqual ( fp . string ( "sot23" ) . circuitJson ( ) )
14+
15+ const svgContent = convertCircuitJsonToPcbSvg ( circuitJson )
16+ expect ( svgContent ) . toMatchSvgSnapshot ( import . meta. path , "sot23_legacy_alias" )
17+ } )
18+
19+ test ( "sot-23 pin-count aliases" , ( ) => {
20+ const aliases = [
21+ [ "sot-23-3" , "sot23_3" ] ,
22+ [ "sot-23-5" , "sot23_5" ] ,
23+ [ "sot-23-6" , "sot23_6" ] ,
24+ ] as const
25+
26+ for ( const [ alias , canonical ] of aliases ) {
27+ const circuitJson = fp . string ( alias ) . circuitJson ( )
28+ expect ( circuitJson ) . toEqual ( fp . string ( canonical ) . circuitJson ( ) )
29+
30+ const svgContent = convertCircuitJsonToPcbSvg ( circuitJson )
31+ expect ( svgContent ) . toMatchSvgSnapshot ( import . meta. path , alias )
32+ }
33+ } )
34+
1035test ( "sot23_w3_h1.5_p0.95mm" , ( ) => {
1136 const circuitJson = fp . string ( "sot23_w3_h1.5_p0.95mm" ) . circuitJson ( )
1237 const svgContent = convertCircuitJsonToPcbSvg ( circuitJson )
0 commit comments