1
1
import { test , expect } from "bun:test"
2
2
import type { AnyCircuitElement , PcbPlacementError } from "circuit-json"
3
- import { checkViasOutOfBoard } from "lib/check-pcb-components-out-of-board/checkViasOutOfBoard "
3
+ import { checkViasOffBoard } from "lib/check-pcb-components-out-of-board/checkViasOffBoard "
4
4
5
5
test ( "no board, should return no errors" , ( ) => {
6
6
const soup : AnyCircuitElement [ ] = [
@@ -14,7 +14,7 @@ test("no board, should return no errors", () => {
14
14
layers : [ "top" , "bottom" ] ,
15
15
} ,
16
16
]
17
- const errors = checkViasOutOfBoard ( soup )
17
+ const errors = checkViasOffBoard ( soup )
18
18
expect ( errors ) . toEqual ( [ ] )
19
19
} )
20
20
@@ -30,7 +30,7 @@ test("no vias, should return no errors", () => {
30
30
thickness : 1.2 ,
31
31
} ,
32
32
]
33
- const errors = checkViasOutOfBoard ( soup )
33
+ const errors = checkViasOffBoard ( soup )
34
34
expect ( errors ) . toEqual ( [ ] )
35
35
} )
36
36
@@ -55,7 +55,7 @@ test("via completely inside board, should return no errors", () => {
55
55
layers : [ "top" , "bottom" ] ,
56
56
} ,
57
57
]
58
- const errors = checkViasOutOfBoard ( soup )
58
+ const errors = checkViasOffBoard ( soup )
59
59
expect ( errors ) . toEqual ( [ ] )
60
60
} )
61
61
@@ -80,7 +80,7 @@ test("via partially outside board (crossing boundary), should return an error",
80
80
layers : [ "top" , "bottom" ] ,
81
81
} ,
82
82
]
83
- const errors = checkViasOutOfBoard ( soup )
83
+ const errors = checkViasOffBoard ( soup )
84
84
expect ( errors ) . toHaveLength ( 1 )
85
85
expect ( errors [ 0 ] . message ) . toContain (
86
86
"Via pcb_via[#via_partially_out] is outside or crossing the board boundary" ,
@@ -111,7 +111,7 @@ test("via completely outside board, should return an error", () => {
111
111
layers : [ "top" , "bottom" ] ,
112
112
} ,
113
113
]
114
- const errors = checkViasOutOfBoard ( soup )
114
+ const errors = checkViasOffBoard ( soup )
115
115
expect ( errors ) . toHaveLength ( 1 )
116
116
expect ( errors [ 0 ] . message ) . toContain (
117
117
"Via pcb_via[#via_completely_out] is outside or crossing the board boundary" ,
@@ -163,7 +163,7 @@ test("multiple vias, some in, some out", () => {
163
163
layers : [ "top" , "bottom" ] ,
164
164
} ,
165
165
]
166
- const errors = checkViasOutOfBoard ( soup )
166
+ const errors = checkViasOffBoard ( soup )
167
167
expect ( errors ) . toHaveLength ( 2 )
168
168
const errorMessages = errors . map ( ( e ) => e . message )
169
169
expect ( errorMessages ) . toContain (
0 commit comments