setup jest-puppeteer

This commit is contained in:
LouisLam
2021-10-03 18:16:55 +08:00
parent 446fc1af0b
commit a2a4c70cf5
7 changed files with 6225 additions and 5 deletions

21
test/test.spec.js Normal file
View File

@@ -0,0 +1,21 @@
beforeAll(() => {
});
afterAll(() => {
return console.log("Cleanup");
});
describe("Very Simple Test", () => {
const title = "Uptime Kuma";
beforeAll(async () => {
await page.goto("http://127.0.0.1:3002");
});
it(`should be titled "${title}"`, async () => {
await expect(page.title()).resolves.toMatch(title);
});
});