From 515e1ce2d7dbeafa174602e44530fc4a59550e2e Mon Sep 17 00:00:00 2001 From: Nikita Rykov <40735471+angrymouse@users.noreply.github.com> Date: Sat, 16 Sep 2023 00:37:39 +0200 Subject: [PATCH] Add test for resolving wildcard --- src/lib/encoding.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/encoding.test.ts b/src/lib/encoding.test.ts index 2f4cd9ad..9d4857ef 100644 --- a/src/lib/encoding.test.ts +++ b/src/lib/encoding.test.ts @@ -247,6 +247,14 @@ describe('Manifest parsing', () => { expect(id).to.equal('cG7Hdi_iTQPoEYgQJFqJ8NMpN4KoZ-vH_j7pG4iP7NI'); }); + it('should return wildcard file for files not present in manifest', async ()=>{ + const id=await resolveManifestStreamPath( + exampleManifestStream(), + 'path/that/does/not/exist.txt' + ); + expect(id).to.equal('vNIcG7HdiMpFqJ8NZN4KopG4_iTQPoH_j7iP7EYgQJ-') + }) + it('should return the ID for non-index paths', async () => { // TODO use an array here const id1 = await resolveManifestStreamPath(