@@ -123,7 +123,7 @@ async function runTest(file: string, languageId: string, facetId: string) {
123123
124124 const editor = ide . activeTextEditor ! ;
125125
126- const outputFixture = ( ( ) : string => {
126+ const [ outputFixture , numScopes ] = ( ( ) : [ string , number ] => {
127127 const config = {
128128 visibleOnly : false ,
129129 scopeType,
@@ -137,17 +137,21 @@ async function runTest(file: string, languageId: string, facetId: string) {
137137 includeNestedTargets : false ,
138138 } ,
139139 ) ;
140- return serializeIterationScopeFixture ( code , iterationScopes ) ;
140+ return [
141+ serializeIterationScopeFixture ( code , iterationScopes ) ,
142+ iterationScopes . length ,
143+ ] ;
141144 }
142145
143146 const scopes = scopeProvider . provideScopeRanges ( editor , config ) ;
144147
145- return serializeScopeFixture ( facetId , code , scopes ) ;
148+ return [ serializeScopeFixture ( facetId , code , scopes ) , scopes . length ] ;
146149 } ) ( ) ;
147150
148151 if ( shouldUpdateFixtures ( ) ) {
149152 await fsp . writeFile ( file , outputFixture ) ;
150153 } else {
154+ assert . isAbove ( numScopes , 0 , "No scopes found" ) ;
151155 assert . equal ( outputFixture , fixture ) ;
152156 }
153157}
0 commit comments