Skip to content

Commit bb76042

Browse files
severoplatypii
andauthored
Update test/lib/sources/huggingFaceSource.test.ts
Co-authored-by: Kenny Daniel <[email protected]>
1 parent 606ea70 commit bb76042

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

test/lib/sources/huggingFaceSource.test.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ describe('parseHuggingFaceUrl', () => {
2222
path: '',
2323
})
2424
})
25-
test.for([
26-
'ftp://huggingface.co',
27-
'email://huggingface.co',
28-
'http://huggingface.co',
29-
'https://hf.com',
30-
'https://github.com',
31-
'huggingface.co',
32-
])('throws for unsupported scheme or domain: \'%s\'', (host) => {
33-
expect(() => parseHuggingFaceUrl(`${host}/datasets/namespace/repo`)).to.throw()
25+
it('throws for unsupported scheme or domain', () => {
26+
expect(() => parseHuggingFaceUrl('ftp://huggingface.co/datasets/namespace/repo')).toThrow()
27+
expect(() => parseHuggingFaceUrl('email://huggingface.co/datasets/namespace/repo')).toThrow()
28+
expect(() => parseHuggingFaceUrl('http://huggingface.co/datasets/namespace/repo')).toThrow()
29+
expect(() => parseHuggingFaceUrl('https://hf.com/datasets/namespace/repo')).toThrow()
30+
expect(() => parseHuggingFaceUrl('https://github.com/datasets/namespace/repo')).toThrow()
31+
expect(() => parseHuggingFaceUrl('huggingface.co/datasets/namespace/repo')).toThrow()
3432
})
3533

3634
test.for([

0 commit comments

Comments
 (0)