mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 06:23:16 +00:00
update tests
This commit is contained in:
parent
2b219cfd22
commit
18bbb25e31
4 changed files with 9 additions and 9 deletions
|
@ -11,5 +11,5 @@ test("ensure custom driver creates PDF", async () => {
|
|||
}
|
||||
|
||||
const pdfs = fs.readdirSync("test-crawls/collections/custom-driver-1").filter(x => x.endsWith(".pdf"));
|
||||
expect(pdfs.length).toBe(1);
|
||||
expect(pdfs.length).toBe(17);
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ test("run crawl without auth", () => {
|
|||
} catch (e) {
|
||||
status = e.status;
|
||||
}
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(17);
|
||||
});
|
||||
|
||||
test("run crawl with auth", () => {
|
||||
|
|
|
@ -75,7 +75,7 @@ describe("socks5 + https proxy tests", () => {
|
|||
} catch (e) {
|
||||
status = e.status;
|
||||
}
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(21);
|
||||
});
|
||||
|
||||
test(`${scheme} proxy, ${type}, wrong protocol`, () => {
|
||||
|
@ -86,7 +86,7 @@ describe("socks5 + https proxy tests", () => {
|
|||
} catch (e) {
|
||||
status = e.status;
|
||||
}
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(21);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ describe("socks5 + https proxy tests", () => {
|
|||
} catch (e) {
|
||||
status = e.status;
|
||||
}
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(21);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -116,7 +116,7 @@ test("http proxy set, but not running, separate env vars", () => {
|
|||
} catch (e) {
|
||||
status = e.status;
|
||||
}
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(21);
|
||||
});
|
||||
|
||||
test("http proxy set, but not running, cli arg", () => {
|
||||
|
@ -127,7 +127,7 @@ test("http proxy set, but not running, cli arg", () => {
|
|||
} catch (e) {
|
||||
status = e.status;
|
||||
}
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(21);
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ test("run crawl with retries for 503, not enough retries, fail", async () => {
|
|||
|
||||
await crawlFinished;
|
||||
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(17);
|
||||
// (1 + 1) * 3 requests == 6 requests
|
||||
expect(requests).toBe(6);
|
||||
expect(success).toBe(false);
|
||||
|
@ -158,7 +158,7 @@ test("run crawl with retries for 503, no retries, fail", async () => {
|
|||
|
||||
await crawlFinished;
|
||||
|
||||
expect(status).toBe(1);
|
||||
expect(status).toBe(17);
|
||||
// (1) * 3 requests == 3 requests
|
||||
expect(requests).toBe(3);
|
||||
expect(success).toBe(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue