@@ -224,7 +224,6 @@ test("Virtual RL: GLOB resources from application.a w/o virtual base path prefix
224
224
225
225
test ( "Virtual RL: GLOB virtual directory w/o virtual base path prefix" , ( t ) => {
226
226
// TODO: Add similar test (globbing on empty directory) for FS RL
227
- // TODO: Also add tests for nodir: true option
228
227
const readerWriter = ui5Fs . resourceFactory . createAdapter ( {
229
228
virBasePath : "/app/"
230
229
} ) ;
@@ -240,7 +239,6 @@ test("Virtual RL: GLOB virtual directory w/o virtual base path prefix", (t) => {
240
239
241
240
test ( "Virtual RL: GLOB virtual directory w/ virtual base path prefix" , ( t ) => {
242
241
// TODO: Add similar test (globbing on empty directory) for FS RL
243
- // TODO: Also add tests for nodir: true option
244
242
const readerWriter = ui5Fs . resourceFactory . createAdapter ( {
245
243
virBasePath : "/app/one/two/"
246
244
} ) ;
@@ -254,6 +252,34 @@ test("Virtual RL: GLOB virtual directory w/ virtual base path prefix", (t) => {
254
252
) ;
255
253
} ) ;
256
254
255
+ test ( "Virtual RL: GLOB virtual directory w/o virtual base path prefix and nodir: true" , ( t ) => {
256
+ const readerWriter = ui5Fs . resourceFactory . createAdapter ( {
257
+ virBasePath : "/app/"
258
+ } ) ;
259
+
260
+ // Get resource from one readerWriter
261
+ return t . notThrows (
262
+ readerWriter . byGlob ( "/*" , { nodir : true } )
263
+ . then ( ( resources ) => {
264
+ t . deepEqual ( resources . length , 0 , "Found exactly one resource" ) ;
265
+ } )
266
+ ) ;
267
+ } ) ;
268
+
269
+ test ( "Virtual RL: GLOB virtual directory w/ virtual base path prefix and nodir: true" , ( t ) => {
270
+ const readerWriter = ui5Fs . resourceFactory . createAdapter ( {
271
+ virBasePath : "/app/one/two/"
272
+ } ) ;
273
+
274
+ // Get resource from one readerWriter
275
+ return t . notThrows (
276
+ readerWriter . byGlob ( "/*" , { nodir : true } )
277
+ . then ( ( resources ) => {
278
+ t . deepEqual ( resources . length , 0 , "Found exactly one resource" ) ;
279
+ } )
280
+ ) ;
281
+ } ) ;
282
+
257
283
test ( "createCollectionsForTree" , ( t ) => {
258
284
// Creates resource reader collections for a given tree
259
285
const resourceReaders = ui5Fs . resourceFactory . createCollectionsForTree ( applicationBTree ) ;
0 commit comments