mirror of
https://github.com/d-fi/d-fi-core.git
synced 2025-07-27 07:34:42 +02:00
fail tests
This commit is contained in:
parent
89e42b5781
commit
17504bff75
@ -95,3 +95,24 @@ if (process.env.CI) {
|
||||
t.true(response.tracks.length > 150);
|
||||
});
|
||||
}
|
||||
|
||||
// Fail Tests
|
||||
test('SHOULD FAIL STRING', async (t) => {
|
||||
const str = 'hello there';
|
||||
try {
|
||||
await parseInfo(str);
|
||||
t.fail();
|
||||
} catch (err) {
|
||||
t.is(err.message, 'Unknown URL: ' + str);
|
||||
}
|
||||
});
|
||||
|
||||
test('SHOULD FAIL URL', async (t) => {
|
||||
const url = 'https://example.com/browse/track/56681099';
|
||||
try {
|
||||
await parseInfo(url);
|
||||
t.fail();
|
||||
} catch (err) {
|
||||
t.is(err.message, 'Unknown URL: ' + url);
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user