mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 06:29:57 +08:00
update jest test
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
beforeAll(() => {
|
||||
const fs = require("fs");
|
||||
|
||||
beforeAll(() => {
|
||||
fs.rmdirSync("./data/test", {
|
||||
recursive: true,
|
||||
});
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
return console.log("Cleanup");
|
||||
|
||||
});
|
||||
|
||||
describe("Very Simple Test", () => {
|
||||
|
||||
const title = "Uptime Kuma";
|
||||
|
||||
beforeAll(async () => {
|
||||
@@ -17,5 +20,19 @@ describe("Very Simple Test", () => {
|
||||
it(`should be titled "${title}"`, async () => {
|
||||
await expect(page.title()).resolves.toMatch(title);
|
||||
});
|
||||
|
||||
it("Create an admin account", async () => {
|
||||
await page.evaluate(() => document.);
|
||||
});
|
||||
});
|
||||
|
||||
describe("Status Page", () => {
|
||||
const title = "Uptime Kuma";
|
||||
beforeAll(async () => {
|
||||
await page.goto("http://127.0.0.1:3002/status");
|
||||
});
|
||||
it(`should be titled "${title}"`, async () => {
|
||||
await expect(page.title()).resolves.toMatch(title);
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user