Suppress Node DEP0040 punycode warning in CLI startup
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { shouldSuppressNodeWarning } from './suppressNodeWarnings.js';
|
||||
|
||||
describe('shouldSuppressNodeWarning', () => {
|
||||
it('suppresses DEP0040 warning code', () => {
|
||||
expect(shouldSuppressNodeWarning('DEP0040', 'any message')).toBe(true);
|
||||
});
|
||||
|
||||
it('suppresses punycode deprecation by message text', () => {
|
||||
expect(shouldSuppressNodeWarning(undefined, 'The `punycode` module is deprecated.')).toBe(true);
|
||||
});
|
||||
|
||||
it('does not suppress unrelated warnings', () => {
|
||||
expect(shouldSuppressNodeWarning('DEP0001', 'different deprecation')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user