File tree 1 file changed +18
-0
lines changed 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -236,3 +236,21 @@ test.failing('`{extension: false}` and `expandDirectories.extensions` option', t
236
236
]
237
237
) ;
238
238
} ) ;
239
+
240
+ // https://github.com/sindresorhus/globby/issues/105
241
+ test . failing ( 'throws ENOTDIR when specifying a file as cwd - async' , async t => {
242
+ const isFile = path . resolve ( 'fixtures/gitignore/bar.js' ) ;
243
+ await t . throwsAsync ( m ( '.' , { cwd : isFile } ) , { code : 'ENOTDIR' } ) ;
244
+ await t . throwsAsync ( m ( '*' , { cwd : isFile } ) , { code : 'ENOTDIR' } ) ;
245
+ } ) ;
246
+
247
+ // https://github.com/sindresorhus/globby/issues/105
248
+ test . failing ( 'throws ENOTDIR when specifying a file as cwd - sync' , t => {
249
+ const isFile = path . resolve ( 'fixtures/gitignore/bar.js' ) ;
250
+ t . throws ( ( ) => {
251
+ m . sync ( '.' , { cwd : isFile } ) ;
252
+ } , { code : 'ENOTDIR' } ) ;
253
+ t . throws ( ( ) => {
254
+ m . sync ( '*' , { cwd : isFile } ) ;
255
+ } , { code : 'ENOTDIR' } ) ;
256
+ } ) ;
You can’t perform that action at this time.
0 commit comments