mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
PR-URL: https://github.com/nodejs/node/pull/62005 Fixes: https://github.com/nodejs/node/issues/61724 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
24 lines
708 B
JavaScript
24 lines
708 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
|
|
const assert = require('assert');
|
|
const url = require('url');
|
|
|
|
const fixturePath = fixtures.path('node_modules', 'url-deprecations.js');
|
|
|
|
// Application deprecation for url.parse()
|
|
url.parse('foo');
|
|
common.expectWarning('DeprecationWarning',
|
|
[/`url\.parse\(\)` behavior is not standardized/, 'DEP0169']);
|
|
|
|
// No warnings from inside node_modules
|
|
common.spawnPromisified(process.execPath, [fixturePath]).then(
|
|
common.mustCall(({ code, signal, stderr }) => {
|
|
assert.strictEqual(code, 0);
|
|
assert.strictEqual(signal, null);
|
|
assert.doesNotMatch(stderr, /\[DEP0169\]/);
|
|
})
|
|
);
|