mobiletto 1.0.39 → 1.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/test/index.spec.js +11 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "A storage abstraction layer",
5
5
  "main": "index.js",
6
6
  "author": "Jonathan Cobb",
@@ -310,13 +310,17 @@ for (const driverName of DRIVER_NAMES) {
310
310
  expect(baseListing).to.have.lengthOf.greaterThanOrEqual(1)
311
311
  expect(baseListing.find(o => o.name === path.dirname(randomParent))).to.not.be.null
312
312
  })
313
- it("should successfully list files in a subdirectory", async () => {
314
- const listing = await fixture.api.list(randomParent)
315
- expect(listing).to.have.lengthOf.greaterThanOrEqual(1)
316
- })
317
- it("should successfully list files in a subdirectory ending with a slash", async () => {
318
- const listing = await fixture.api.list(randomParent+'/')
319
- expect(listing).to.have.lengthOf.greaterThanOrEqual(1)
313
+ it("should successfully list files in a subdirectory, with or without a trailing slash", async () => {
314
+ const noSlash = await fixture.api.list(randomParent)
315
+ expect(noSlash).to.have.lengthOf.greaterThanOrEqual(1)
316
+ const withSlash = await fixture.api.list(randomParent+'/')
317
+ expect(withSlash).to.have.lengthOf.greaterThanOrEqual(1)
318
+ for (const f of noSlash) {
319
+ expect(withSlash.find(o => o.name === f.name)).to.not.be.null
320
+ }
321
+ for (const f of withSlash) {
322
+ expect(noSlash.find(o => o.name === f.name)).to.not.be.null
323
+ }
320
324
  })
321
325
  it("should load metadata for one of the new files", async () => {
322
326
  await assertMeta(fixture.api, fixture.name, READ_SZ, encryption ? ENC_SIZE_CLOSE_ENOUGH_PERCENT : null)