@@ -123,7 +123,7 @@ async function runTest(file: string, languageId: string, facetId: string) {
123
123
124
124
const editor = ide . activeTextEditor ! ;
125
125
126
- const outputFixture = ( ( ) : string => {
126
+ const [ outputFixture , numScopes ] = ( ( ) : [ string , number ] => {
127
127
const config = {
128
128
visibleOnly : false ,
129
129
scopeType,
@@ -137,17 +137,21 @@ async function runTest(file: string, languageId: string, facetId: string) {
137
137
includeNestedTargets : false ,
138
138
} ,
139
139
) ;
140
- return serializeIterationScopeFixture ( code , iterationScopes ) ;
140
+ return [
141
+ serializeIterationScopeFixture ( code , iterationScopes ) ,
142
+ iterationScopes . length ,
143
+ ] ;
141
144
}
142
145
143
146
const scopes = scopeProvider . provideScopeRanges ( editor , config ) ;
144
147
145
- return serializeScopeFixture ( facetId , code , scopes ) ;
148
+ return [ serializeScopeFixture ( facetId , code , scopes ) , scopes . length ] ;
146
149
} ) ( ) ;
147
150
148
151
if ( shouldUpdateFixtures ( ) ) {
149
152
await fsp . writeFile ( file , outputFixture ) ;
150
153
} else {
154
+ assert . isAbove ( numScopes , 0 , "No scopes found" ) ;
151
155
assert . equal ( outputFixture , fixture ) ;
152
156
}
153
157
}
0 commit comments