@@ -178,7 +178,7 @@ type ArtifactMarkingsTest = {
178178 callDef ?: string
179179}
180180
181- function codeToArtifactMarkingsTest ( fixture : string ) : ArtifactMarkingsTest {
181+ function codeToArtifactMarkingsTest ( fixture : string ) : Omit < ArtifactMarkingsTest , 'fixture' > {
182182 const artifactMarkingsResult = addArtifactMarkings ( fixture , '/file.js' )
183183
184184 if ( artifactMarkingsResult . err ) {
@@ -192,7 +192,6 @@ function codeToArtifactMarkingsTest(fixture: string): ArtifactMarkingsTest {
192192 const argumentsMarking = markings . find ( ( m ) => m . type === 'arguments' )
193193 const paramsMarking = markings . find ( ( m ) => m . type === 'params' )
194194 return {
195- fixture,
196195 ...( functionMarking && {
197196 functionDef : fixture . substring ( functionMarking . startIndex , functionMarking . endIndex )
198197 } ) ,
@@ -215,17 +214,27 @@ const artifactMarkingsFixtures: Record<string, ArtifactMarkingsTest[]> = {
215214 callDef : 'console.log' ,
216215 argumentsDef : '(a)'
217216 } ,
217+ {
218+ fixture : 'console.log(a, b)' ,
219+ callDef : 'console.log' ,
220+ argumentsDef : '(a, b)'
221+ } ,
218222 {
219223 fixture : 'console.log()' ,
220224 callDef : 'console.log' ,
221225 argumentsDef : '()'
222226 } ,
223227 // random spacing
224228 {
225- fixture : 'console.log (a) ' ,
229+ fixture : 'console.log (a)' ,
226230 callDef : 'console.log' ,
227231 argumentsDef : '(a)'
228232 } ,
233+ {
234+ fixture : 'console.log (a, b)' ,
235+ callDef : 'console.log' ,
236+ argumentsDef : '(a, b)'
237+ } ,
229238 {
230239 fixture : 'console.log () ' ,
231240 callDef : 'console.log' ,
@@ -323,11 +332,12 @@ const artifactMarkingsFixtures: Record<string, ArtifactMarkingsTest[]> = {
323332 ]
324333}
325334
326- describe . skip ( 'artifact markings new @todo add back ' , ( ) => {
335+ describe ( 'artifact markings new' , ( ) => {
327336 for ( const [ suiteName , artifactTests ] of Object . entries ( artifactMarkingsFixtures ) ) {
328337 it ( suiteName , ( ) => {
329338 for ( let i = 0 ; i < artifactTests . length ; i ++ ) {
330- expect ( codeToArtifactMarkingsTest ( artifactTests [ i ] . fixture ) ) . toEqual ( artifactTests [ i ] )
339+ const { fixture, ...testWithoutFixture } = artifactTests [ i ]
340+ expect ( codeToArtifactMarkingsTest ( artifactTests [ i ] . fixture ) ) . toEqual ( testWithoutFixture )
331341 }
332342 } )
333343 }
0 commit comments