Skip to content

Commit 11e1d71

Browse files
committed
strip VTControl characters to make CI happy
1 parent ac36a04 commit 11e1d71

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

integrations/upgrade/upgrade-errors.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { stripVTControlCharacters } from 'node:util'
12
// @ts-expect-error This path does exist
23
import { version } from '../../packages/tailwindcss/package.json'
34
import { css, html, js, json, test } from '../utils'
@@ -51,7 +52,7 @@ test(
5152
return exec('npx @tailwindcss/upgrade', {}, { ignoreStdErr: true }).catch((e) => {
5253
// Replacing the current version with a hardcoded `v4` to make it stable
5354
// when we release new minor/patch versions.
54-
return Promise.reject(e.message.replaceAll(version, '4.0.0'))
55+
return Promise.reject(stripVTControlCharacters(e.message.replaceAll(version, '4.0.0')))
5556
})
5657
}).rejects.toThrowErrorMatchingInlineSnapshot(`
5758
"Command failed: npx @tailwindcss/upgrade
@@ -127,7 +128,7 @@ test(
127128
return exec('npx @tailwindcss/upgrade', {}, { ignoreStdErr: true }).catch((e) => {
128129
// Replacing the current version with a hardcoded `v4` to make it stable
129130
// when we release new minor/patch versions.
130-
return Promise.reject(e.message.replaceAll(version, '4.0.0'))
131+
return Promise.reject(stripVTControlCharacters(e.message.replaceAll(version, '4.0.0')))
131132
})
132133
}).rejects.toThrowErrorMatchingInlineSnapshot(`
133134
"Command failed: npx @tailwindcss/upgrade
@@ -203,7 +204,7 @@ test(
203204
return exec('npx @tailwindcss/upgrade', {}, { ignoreStdErr: true }).catch((e) => {
204205
// Replacing the current version with a hardcoded `v4` to make it stable
205206
// when we release new minor/patch versions.
206-
return Promise.reject(e.message.replaceAll(version, '4.0.0'))
207+
return Promise.reject(stripVTControlCharacters(e.message.replaceAll(version, '4.0.0')))
207208
})
208209
}).rejects.toThrowErrorMatchingInlineSnapshot(`
209210
"Command failed: npx @tailwindcss/upgrade

0 commit comments

Comments
 (0)