File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
33const common = require ( '../common' ) ;
4+ const assert = require ( 'assert' ) ;
45// The v8 modules when imported leak globals. Disable global check.
56common . globalCheck = false ;
67
@@ -20,6 +21,13 @@ const deprecatedModules = [
2021 'v8/tools/tickprocessor-driver'
2122] ;
2223
24+ // Newly added deps that do not have a deprecation wrapper around it would
25+ // throw an error, but no warning would be emitted.
26+ const deps = [
27+ 'acorn/dist/acorn' ,
28+ 'acorn/dist/walk'
29+ ] ;
30+
2331common . expectWarning ( 'DeprecationWarning' , deprecatedModules . map ( ( m ) => {
2432 return `Requiring Node.js-bundled '${ m } ' module is deprecated. ` +
2533 'Please install the necessary module locally.' ;
@@ -30,3 +38,7 @@ for (const m of deprecatedModules) {
3038 require ( m ) ;
3139 } catch ( err ) { }
3240}
41+
42+ for ( const m of deps ) {
43+ assert . throws ( ( ) => { require ( m ) ; } , / ^ E r r o r : C a n n o t f i n d m o d u l e / ) ;
44+ }
You can’t perform that action at this time.
0 commit comments