11import * as junit2json from '../src/index.ts'
22import * as fs from 'node:fs'
33import * as path from 'node:path'
4- import { describe , it } from 'node:test' ;
5- import assert from 'node:assert/strict' ;
4+ import { describe , it , test } from 'node:test' ;
65import { fileURLToPath } from 'node:url' ;
76
87const __filename = fileURLToPath ( import . meta. url ) ;
@@ -13,31 +12,31 @@ const fixturePath = (fixtureName: string) => {
1312}
1413
1514describe ( 'parse snapshot' , ( ) => {
16- it ( 'all success xml' , async ( ) => {
15+ test ( 'all success xml' , async ( t ) => {
1716 const xml = fs . readFileSync ( fixturePath ( 'jest-success.xml' ) )
1817 const parsed = await junit2json . parse ( xml )
1918
20- assert . snapshot ( parsed , { description : 'all success xml snapshot' } ) ;
19+ t . assert . snapshot ( parsed ) ;
2120 } )
2221
23- it ( 'jest failure xml' , async ( ) => {
22+ test ( 'jest failure xml' , async ( t ) => {
2423 const xml = fs . readFileSync ( fixturePath ( 'jest-failure.xml' ) )
2524 const parsed = await junit2json . parse ( xml )
2625
27- assert . snapshot ( parsed , { description : 'jest failure xml snapshot' } ) ;
26+ t . assert . snapshot ( parsed ) ;
2827 } )
2928
30- it ( 'nunit failure xml' , async ( ) => {
29+ test ( 'nunit failure xml' , async ( t ) => {
3130 const xml = fs . readFileSync ( fixturePath ( 'nunit-failure.xml' ) )
3231 const parsed = await junit2json . parse ( xml )
3332
34- assert . snapshot ( parsed , { description : 'nunit failure xml snapshot' } ) ;
33+ t . assert . snapshot ( parsed ) ;
3534 } )
3635
37- it ( 'Android robolectric success xml' , async ( ) => {
36+ test ( 'Android robolectric success xml' , async ( t ) => {
3837 const xml = fs . readFileSync ( fixturePath ( 'android-robolectric-success.xml' ) )
3938 const parsed = await junit2json . parse ( xml )
4039
41- assert . snapshot ( parsed , { description : 'Android robolectric success xml snapshot' } ) ;
40+ t . assert . snapshot ( parsed ) ;
4241 } )
4342} )
0 commit comments