File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -136,9 +136,8 @@ class DependencyMapperInstance {
136136 if ( ! target ) {
137137 throw new ERR_MANIFEST_INVALID_SPECIFIER (
138138 this . href ,
139- target +
140- ', pattern needs to have a single' +
141- 'trailing "*" in target' ) ;
139+ `${ target } , pattern needs to have a single trailing "*" in target`
140+ ) ;
142141 }
143142 const prefix = target [ 1 ] ;
144143 const suffix = target [ 2 ] ;
Original file line number Diff line number Diff line change 1+ {
2+ "resources" : {
3+ "./fhqwhgads.js" : {
4+ "dependencies" : {
5+ "**" : true
6+ }
7+ }
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+ const common = require ( '../common' ) ;
4+ common . requireNoPackageJSONAbove ( ) ;
5+
6+ const assert = require ( 'assert' ) ;
7+ const { spawnSync } = require ( 'child_process' ) ;
8+ const fixtures = require ( '../common/fixtures.js' ) ;
9+
10+ const policyFilepath = fixtures . path ( 'policy-manifest' , 'invalid.json' ) ;
11+
12+ const result = spawnSync ( process . execPath , [
13+ '--experimental-policy' ,
14+ policyFilepath ,
15+ './fhqwhgads.js' ,
16+ ] ) ;
17+
18+ assert . notStrictEqual ( result . status , 0 ) ;
19+ const stderr = result . stderr . toString ( ) ;
20+ assert . match ( stderr , / E R R _ M A N I F E S T _ I N V A L I D _ S P E C I F I E R / ) ;
21+ assert . match ( stderr , / p a t t e r n n e e d s t o h a v e a s i n g l e t r a i l i n g " \* " / ) ;
You can’t perform that action at this time.
0 commit comments