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';
22import { appendToFile , replaceInFile , readFile } from '../../utils/fs' ;
33import { applyVitestBuilder } from '../../utils/vitest' ;
44import assert from 'node:assert/strict' ;
5+ import { stripVTControlCharacters } from 'node:util' ;
56
67export default async function ( ) {
78 // Set up the test project to use the vitest runner
@@ -28,7 +29,7 @@ export default async function () {
2829 // First run: create snapshots
2930 const { stdout : firstRunStdout } = await ng ( 'test' ) ;
3031 assert . match (
31- firstRunStdout ,
32+ stripVTControlCharacters ( firstRunStdout ) ,
3233 / S n a p s h o t s \s + 2 w r i t t e n / ,
3334 'Snapshots were not written on the first run.' ,
3435 ) ;
@@ -58,7 +59,7 @@ export default async function () {
5859 ( ) => ng ( 'test' ) ,
5960 ( err : any ) => {
6061 assert . match (
61- err . toString ( ) ,
62+ stripVTControlCharacters ( err . toString ( ) ) ,
6263 / S n a p s h o t s \s + 2 f a i l e d / ,
6364 'Expected snapshot mismatch error, but a different error occurred.' ,
6465 ) ;
You can’t perform that action at this time.
0 commit comments