File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const {
30
30
exposeLazyInterfaces,
31
31
defineReplaceableLazyAttribute,
32
32
setupCoverageHooks,
33
+ emitExperimentalWarning,
33
34
} = require ( 'internal/util' ) ;
34
35
35
36
const {
@@ -538,8 +539,7 @@ function initializePermission() {
538
539
} ;
539
540
// Guarantee path module isn't monkey-patched to bypass permission model
540
541
ObjectFreeze ( require ( 'path' ) ) ;
541
- process . emitWarning ( 'Permission is an experimental feature' ,
542
- 'ExperimentalWarning' ) ;
542
+ emitExperimentalWarning ( 'Permission' ) ;
543
543
const { has } = require ( 'internal/process/permission' ) ;
544
544
const warnFlags = [
545
545
'--allow-addons' ,
@@ -628,8 +628,7 @@ function initializeSourceMapsHandlers() {
628
628
629
629
function initializeFrozenIntrinsics ( ) {
630
630
if ( getOptionValue ( '--frozen-intrinsics' ) ) {
631
- process . emitWarning ( 'The --frozen-intrinsics flag is experimental' ,
632
- 'ExperimentalWarning' ) ;
631
+ emitExperimentalWarning ( 'Frozen intristics' ) ;
633
632
require ( 'internal/freeze_intrinsics' ) ( ) ;
634
633
}
635
634
}
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ const assert = require('assert');
9
9
// when using permission system
10
10
11
11
process . on ( 'warning' , common . mustCall ( ( warning ) => {
12
- assert . match ( warning . message , / P e r m i s s i o n i s a n e x p e r i m e n t a l f e a t u r e / ) ;
12
+ assert . strictEqual ( warning . name , 'ExperimentalWarning' ) ;
13
13
} , 1 ) ) ;
You can’t perform that action at this time.
0 commit comments