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 {
3030 exposeLazyInterfaces,
3131 defineReplaceableLazyAttribute,
3232 setupCoverageHooks,
33+ emitExperimentalWarning,
3334} = require ( 'internal/util' ) ;
3435
3536const {
@@ -538,8 +539,7 @@ function initializePermission() {
538539 } ;
539540 // Guarantee path module isn't monkey-patched to bypass permission model
540541 ObjectFreeze ( require ( 'path' ) ) ;
541- process . emitWarning ( 'Permission is an experimental feature' ,
542- 'ExperimentalWarning' ) ;
542+ emitExperimentalWarning ( 'Permission' ) ;
543543 const { has } = require ( 'internal/process/permission' ) ;
544544 const warnFlags = [
545545 '--allow-addons' ,
@@ -628,8 +628,7 @@ function initializeSourceMapsHandlers() {
628628
629629function initializeFrozenIntrinsics ( ) {
630630 if ( getOptionValue ( '--frozen-intrinsics' ) ) {
631- process . emitWarning ( 'The --frozen-intrinsics flag is experimental' ,
632- 'ExperimentalWarning' ) ;
631+ emitExperimentalWarning ( 'Frozen intristics' ) ;
633632 require ( 'internal/freeze_intrinsics' ) ( ) ;
634633 }
635634}
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ const assert = require('assert');
99// when using permission system
1010
1111process . 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' ) ;
1313} , 1 ) ) ;
You can’t perform that action at this time.
0 commit comments