Skip to content

Commit

Permalink
test: strip ansi before regexing
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Jun 10, 2024
1 parent 87bbe31 commit c618802
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/integration/sf.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {mkdir, readFile, readdir, rm} from 'node:fs/promises'
import {tmpdir} from 'node:os'
import {join} from 'node:path'
import {rsort} from 'semver'
import stripAnsi from 'strip-ansi'

const makeTestDir = async (): Promise<string> => {
const tmpDir = join(tmpdir(), 'sf-update-test')
Expand Down Expand Up @@ -53,7 +54,7 @@ const exec = async (
console.log('Error!', error)
reject(error)
} else {
resolve({code: 0, stderr, stdout})
resolve({code: 0, stderr: stripAnsi(stderr), stdout: stripAnsi(stdout)})
}
})
})
Expand Down

0 comments on commit c618802

Please sign in to comment.