Adds tests and bumps the code coverage up to 100%.
deno test --coverage --unstable still reports three untested lines, but that appears to be a bug in either the coverage reporter or the sourcemap generator, as those lines cannot not be covered:
40 | if (params.has("error")) {
101 | if (!response.ok) {
122 | if (body.refresh_token !== undefined &&
First, those lines are completely off.
The actual contents of those lines are:
40 | if (typeof this.client.config.redirectUri === "string") {
101 | throw new TypeError("Missing code, unable to request token");
122 |
^^^ line 122 is literally empty
The lines of the reported snippets are actually on lines 95, 169 and the third one does not even exist like this in the code, as it is actually split over a few lines:
Anyway, when modifying any of those statement's control flows, tests fail, so I can assume those lines are actually relevant and covered by the tests failing in those scenarios.
Adds tests and bumps the code coverage up to 100%.
deno test --coverage --unstable
still reports three untested lines, but that appears to be a bug in either the coverage reporter or the sourcemap generator, as those lines cannot not be covered:First, those lines are completely off. The actual contents of those lines are:
The lines of the reported snippets are actually on lines 95, 169 and the third one does not even exist like this in the code, as it is actually split over a few lines:
Anyway, when modifying any of those statement's control flows, tests fail, so I can assume those lines are actually relevant and covered by the tests failing in those scenarios.
Close #1