Skip to content

Commit

Permalink
test: add testing to check status website
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkaroid committed Jun 25, 2022
1 parent 191c7f9 commit 9c57c2e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/mock-site.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import c from "../src/utils/options";
import p from "phin";

for (const url of
[c.DBLSTATISTICS, c.OVERWATCHWTF]) {
p({ url }).then(res => {
if (res.statusCode !== 200) {
console.log(`${url} is not available, status code: ${res.statusCode}`);
}
else {
console.log(`${url} is available, can be scraped`);
}
});
}

0 comments on commit 9c57c2e

Please sign in to comment.