File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tests/legacy-cli/e2e/tests/vitest Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { ng } from '../../utils/process';
2
2
import { appendToFile , replaceInFile , readFile } from '../../utils/fs' ;
3
3
import { applyVitestBuilder } from '../../utils/vitest' ;
4
4
import assert from 'node:assert/strict' ;
5
+ import { stripVTControlCharacters } from 'node:util' ;
5
6
6
7
export default async function ( ) {
7
8
// Set up the test project to use the vitest runner
@@ -28,7 +29,7 @@ export default async function () {
28
29
// First run: create snapshots
29
30
const { stdout : firstRunStdout } = await ng ( 'test' ) ;
30
31
assert . match (
31
- firstRunStdout ,
32
+ stripVTControlCharacters ( firstRunStdout ) ,
32
33
/ S n a p s h o t s \s + 2 w r i t t e n / ,
33
34
'Snapshots were not written on the first run.' ,
34
35
) ;
@@ -58,7 +59,7 @@ export default async function () {
58
59
( ) => ng ( 'test' ) ,
59
60
( err : any ) => {
60
61
assert . match (
61
- err . toString ( ) ,
62
+ stripVTControlCharacters ( err . toString ( ) ) ,
62
63
/ S n a p s h o t s \s + 2 f a i l e d / ,
63
64
'Expected snapshot mismatch error, but a different error occurred.' ,
64
65
) ;
You can’t perform that action at this time.
0 commit comments