@@ -18,17 +18,18 @@ test("parse courtyard from Crystal_SMD_HC49-US", async () => {
1818 expect ( courtyards . length ) . toBeGreaterThan ( 0 )
1919
2020 // Verify courtyard properties
21- expect ( courtyards [ 0 ] . type ) . toBe ( "pcb_courtyard_rect" )
22- expect ( courtyards [ 0 ] . layer ) . toBe ( "top" )
23- expect ( courtyards [ 0 ] . stroke_width ) . toBe ( "0.05mm" )
21+ const courtyard = courtyards [ 0 ] as any
22+ expect ( courtyard . type ) . toBe ( "pcb_courtyard_rect" )
23+ expect ( courtyard . layer ) . toBe ( "top" )
24+ expect ( courtyard . stroke_width ) . toBe ( "0.05mm" )
2425
2526 // Verify the courtyard dimensions are correct
2627 // From the kicad_mod file, courtyard is from -6.8,-2.6 to 6.8,2.6
2728 // So width should be 13.6mm, height should be 5.2mm
28- expect ( courtyards [ 0 ] . width ) . toBe ( "13.6mm" )
29- expect ( courtyards [ 0 ] . height ) . toBe ( "5.2mm" )
30- expect ( courtyards [ 0 ] . center . x ) . toBeCloseTo ( 0 , 1 )
31- expect ( courtyards [ 0 ] . center . y ) . toBeCloseTo ( 0 , 1 )
29+ expect ( courtyard . width ) . toBe ( "13.6mm" )
30+ expect ( courtyard . height ) . toBe ( "5.2mm" )
31+ expect ( courtyard . center . x ) . toBeCloseTo ( 0 , 1 )
32+ expect ( courtyard . center . y ) . toBeCloseTo ( 0 , 1 )
3233} )
3334
3435test ( "parse courtyard from R_01005_0402Metric" , async ( ) => {
@@ -45,6 +46,7 @@ test("parse courtyard from R_01005_0402Metric", async () => {
4546
4647 // R_01005 has courtyards
4748 expect ( courtyards . length ) . toBeGreaterThan ( 0 )
48- expect ( courtyards [ 0 ] . type ) . toBe ( "pcb_courtyard_rect" )
49- expect ( courtyards [ 0 ] . layer ) . toBe ( "top" )
49+ const courtyard = courtyards [ 0 ] as any
50+ expect ( courtyard . type ) . toBe ( "pcb_courtyard_rect" )
51+ expect ( courtyard . layer ) . toBe ( "top" )
5052} )
0 commit comments