@@ -3,17 +3,14 @@ import * as fixtures from '../common/fixtures.mjs';
33import * as snapshot from '../common/assertSnapshot.js' ;
44import { describe , it } from 'node:test' ;
55
6- function replaceNodeVersion ( str ) {
7- return str . replaceAll ( process . version , '*' ) ;
8- }
96
107function replaceStackTrace ( str ) {
118 return snapshot . replaceStackTrace ( str , '$1at *$7\n' ) ;
129}
1310
1411describe ( 'console output' , { concurrency : true } , ( ) => {
15- function stackTrace ( str ) {
16- return str . replaceAll ( snapshot . replaceWindowsPaths ( process . cwd ( ) ) , '' ) . replaceAll ( '/' , '*' ) . replaceAll ( / \d + / g, '*' ) ;
12+ function normalize ( str ) {
13+ return str . replaceAll ( snapshot . replaceWindowsPaths ( process . cwd ( ) ) , '' ) . replaceAll ( '/' , '*' ) . replaceAll ( process . version , '*' ) . replaceAll ( / \d + / g, '*' ) ;
1714 }
1815 const tests = [
1916 { name : 'console/2100bytes.js' } ,
@@ -23,7 +20,7 @@ describe('console output', { concurrency: true }, () => {
2320 {
2421 name : 'console/stack_overflow.js' ,
2522 transform : snapshot
26- . transform ( snapshot . replaceWindowsLineEndings , snapshot . replaceWindowsPaths , replaceNodeVersion , stackTrace )
23+ . transform ( snapshot . replaceWindowsLineEndings , snapshot . replaceWindowsPaths , normalize )
2724 } ,
2825 ] ;
2926 const defaultTransform = snapshot
0 commit comments