@@ -40,8 +40,27 @@ export const describe = baseDescribe
40
40
// Re-export expect from vitest
41
41
export { expect }
42
42
43
+ // Fluent interface for any corpus type (HAR or HTML)
44
+ export function withCorpus ( corpusKey : keyof typeof CORPUS ) {
45
+ return {
46
+ it : ( name : string , fn : ( ) => void | Promise < void > ) => {
47
+ return baseTest ( `${ String ( corpusKey ) } :${ name } ` , async ( ) => {
48
+ // Setup DOM for any corpus type (delegates to HAR or HTML based on type)
49
+ await setupDOM ( corpusKey )
50
+
51
+ try {
52
+ return await fn ( )
53
+ } finally {
54
+ // Cleanup after test
55
+ cleanupDOM ( )
56
+ }
57
+ } )
58
+ } ,
59
+ }
60
+ }
61
+
43
62
// Helper function for detection tests
44
- export function getDetectionResults ( ) {
63
+ export function detectedSpots ( ) {
45
64
const enhancers = new EnhancerRegistry ( )
46
65
const textareas = document . querySelectorAll ( 'textarea' )
47
66
const location : StrippedLocation = {
@@ -61,7 +80,7 @@ export function getDetectionResults() {
61
80
}
62
81
63
82
// Helper function for UI tests
64
- export function getUIResults ( ) {
83
+ export function tableUI ( ) {
65
84
const enhancers = new EnhancerRegistry ( )
66
85
const textareas = document . querySelectorAll ( 'textarea' )
67
86
const location : StrippedLocation = {
@@ -88,22 +107,3 @@ export function getUIResults() {
88
107
}
89
108
return uiResults
90
109
}
91
-
92
- // Fluent interface for any corpus type (HAR or HTML)
93
- export function withCorpus ( corpusKey : keyof typeof CORPUS ) {
94
- return {
95
- it : ( name : string , fn : ( ) => void | Promise < void > ) => {
96
- return baseTest ( `${ String ( corpusKey ) } :${ name } ` , async ( ) => {
97
- // Setup DOM for any corpus type (delegates to HAR or HTML based on type)
98
- await setupDOM ( corpusKey )
99
-
100
- try {
101
- return await fn ( )
102
- } finally {
103
- // Cleanup after test
104
- cleanupDOM ( )
105
- }
106
- } )
107
- } ,
108
- }
109
- }
0 commit comments