test: fix test expecations after Node.js 22.9.0 (#32695)
This commit is contained in:
parent
2f4acbb001
commit
48030a4eff
|
|
@ -346,7 +346,7 @@ function rewriteToLocalhostIfNeeded(host: string): string {
|
|||
}
|
||||
|
||||
export function rewriteOpenSSLErrorIfNeeded(error: Error): Error {
|
||||
if (error.message !== 'unsupported')
|
||||
if (error.message !== 'unsupported' && (error as NodeJS.ErrnoException).code !== 'ERR_CRYPTO_UNSUPPORTED_OPERATION')
|
||||
return error;
|
||||
return rewriteErrorMessage(error, [
|
||||
'Unsupported TLS certificate.',
|
||||
|
|
|
|||
|
|
@ -148,5 +148,5 @@ test('should not transform external', async ({ runInlineTest }) => {
|
|||
`
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.output).toContain('Cannot use import statement outside a module');
|
||||
expect(result.output).toMatch(/(Cannot use import statement outside a module|require\(\) of ES Module .* not supported.)/);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue