Skip to content

Commit 45b7ec8

Browse files
committed
add tests about no support for models and spaces
1 parent a35286a commit 45b7ec8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/lib/sources/huggingFaceSource.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ test.for([
3030
expect(() => parseHuggingFaceUrl(url)).to.throw()
3131
})
3232

33+
test.for([
34+
['https://huggingface.co/namespace/model'],
35+
['https://huggingface.co/namespace/model/'],
36+
['https://huggingface.co/spaces/namespace/space'],
37+
['https://huggingface.co/spaces/namespace/space/'],
38+
])('model or space huggingface URL throws: %s', ([url]) => {
39+
expect(() => parseHuggingFaceUrl(url)).to.throw()
40+
})
41+
3342
test.for([
3443
['https://huggingface.co/datasets/namespace/repo', 'namespace/repo'],
3544
['https://huggingface.co/datasets/namespace/repo/', 'namespace/repo'],

0 commit comments

Comments
 (0)