Skip to content

Commit

Permalink
Add test for resolving wildcard
Browse files Browse the repository at this point in the history
  • Loading branch information
angrymouse committed Sep 15, 2023
1 parent 76319bd commit 515e1ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib/encoding.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 515e1ce

Please sign in to comment.