mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-28 05:10:47 +03:00
more edge cast test cases
- check for null instead of 0 #267 - check that parameter specifying multiple overrides repeating parameters
This commit is contained in:
@@ -158,4 +158,18 @@ describe('getUserInfo', () => {
|
||||
})
|
||||
.catch(err => ("couldn't call endpoint"));
|
||||
});
|
||||
|
||||
it('Should return zeroes if userid does not exist', (done: Done) => {
|
||||
fetch(getbaseURL() + '/api/userInfo?userID=getuserinfo_null')
|
||||
.then(async res => {
|
||||
const data = await res.json();
|
||||
for (var value in data) {
|
||||
if (data[value] === null && value !== "lastSegmentID") {
|
||||
done(`returned null for ${value}`)
|
||||
}
|
||||
}
|
||||
done(); // pass
|
||||
})
|
||||
.catch(err => ("couldn't call endpoint"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user