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:
Michael C
2021-06-24 01:37:51 -04:00
parent 1570657e28
commit ae8a25e481
3 changed files with 48 additions and 0 deletions

View File

@@ -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"));
});
});