@@ -96,7 +96,6 @@ test("Virtual RL: GLOB resources from application.a w/o virtual base path prefix
9696
9797test ( "Virtual RL: GLOB virtual directory w/o virtual base path prefix" , ( t ) => {
9898 // TODO: Add similar test (globbing on empty directory) for FS RL
99- // TODO: Also add tests for nodir: true option
10099 let readerWriter = ui5Fs . resourceFactory . createAdapter ( {
101100 virBasePath : "/app/"
102101 } ) ;
@@ -110,9 +109,7 @@ test("Virtual RL: GLOB virtual directory w/o virtual base path prefix", (t) => {
110109 ) ;
111110} ) ;
112111
113- test . only ( "Virtual RL: GLOB virtual directory w/ virtual base path prefix" , ( t ) => {
114- // TODO: Add similar test (globbing on empty directory) for FS RL
115- // TODO: Also add tests for nodir: true option
112+ test ( "Virtual RL: GLOB virtual directory w/ virtual base path prefix" , ( t ) => {
116113 let readerWriter = ui5Fs . resourceFactory . createAdapter ( {
117114 virBasePath : "/app/one/two/"
118115 } ) ;
@@ -125,3 +122,31 @@ test.only("Virtual RL: GLOB virtual directory w/ virtual base path prefix", (t)
125122 } )
126123 ) ;
127124} ) ;
125+
126+ test ( "Virtual RL: GLOB virtual directory w/o virtual base path prefix" , ( t ) => {
127+ let readerWriter = ui5Fs . resourceFactory . createAdapter ( {
128+ virBasePath : "/app/"
129+ } ) ;
130+
131+ // Get resource from one readerWriter
132+ return t . notThrows (
133+ readerWriter . byGlob ( "/*" , { nodir : true } )
134+ . then ( ( resources ) => {
135+ t . deepEqual ( resources . length , 0 , "Found exactly one resource" ) ;
136+ } )
137+ ) ;
138+ } ) ;
139+
140+ test ( "Virtual RL: GLOB virtual directory w/ virtual base path prefix" , ( t ) => {
141+ let readerWriter = ui5Fs . resourceFactory . createAdapter ( {
142+ virBasePath : "/app/one/two/"
143+ } ) ;
144+
145+ // Get resource from one readerWriter
146+ return t . notThrows (
147+ readerWriter . byGlob ( "/*" , { nodir : true } )
148+ . then ( ( resources ) => {
149+ t . deepEqual ( resources . length , 0 , "Found exactly one resource" ) ;
150+ } )
151+ ) ;
152+ } ) ;
0 commit comments