Skip to content

Commit 35b8913

Browse files
committed
Adding test for external uri
1 parent 0939dbe commit 35b8913

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/tests/commons/loadWeightMap.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ describe('loadWeightMap', () => {
5959
expect(result.modelBaseUri).toEqual('/path/to/modelfiles')
6060
})
6161

62+
it('returns correct uris, given external path', () => {
63+
const uri = 'https://example.com/path/to/modelfiles/';
64+
const result = getModelUris(uri, FAKE_DEFAULT_MODEL_NAME)
65+
66+
expect(result.manifestUri).toEqual(uri + 'model-weights_manifest.json')
67+
expect(result.modelBaseUri).toEqual(uri)
68+
})
69+
6270
})
6371

6472
})

0 commit comments

Comments
 (0)