File tree 3 files changed +36
-3
lines changed
3 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -136,9 +136,8 @@ class DependencyMapperInstance {
136
136
if ( ! target ) {
137
137
throw new ERR_MANIFEST_INVALID_SPECIFIER (
138
138
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
+ ) ;
142
141
}
143
142
const prefix = target [ 1 ] ;
144
143
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
+
5
+ if ( ! common . hasCrypto )
6
+ common . skip ( 'missing crypto' ) ;
7
+
8
+ common . requireNoPackageJSONAbove ( ) ;
9
+
10
+ const assert = require ( 'assert' ) ;
11
+ const { spawnSync } = require ( 'child_process' ) ;
12
+ const fixtures = require ( '../common/fixtures.js' ) ;
13
+
14
+ const policyFilepath = fixtures . path ( 'policy-manifest' , 'invalid.json' ) ;
15
+
16
+ const result = spawnSync ( process . execPath , [
17
+ '--experimental-policy' ,
18
+ policyFilepath ,
19
+ './fhqwhgads.js' ,
20
+ ] ) ;
21
+
22
+ assert . notStrictEqual ( result . status , 0 ) ;
23
+ const stderr = result . stderr . toString ( ) ;
24
+ 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 / ) ;
25
+ 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