update jest test
This commit is contained in:
parent
259bcf9426
commit
d25603e629
|
@ -101,6 +101,8 @@
|
||||||
"@vitejs/plugin-legacy": "~1.5.3",
|
"@vitejs/plugin-legacy": "~1.5.3",
|
||||||
"@vitejs/plugin-vue": "~1.9.1",
|
"@vitejs/plugin-vue": "~1.9.1",
|
||||||
"@vue/compiler-sfc": "~3.2.16",
|
"@vue/compiler-sfc": "~3.2.16",
|
||||||
|
"@vue/test-utils": "next",
|
||||||
|
"@vue/vue3-jest": "^27.0.0-alpha.1",
|
||||||
"core-js": "~3.18.0",
|
"core-js": "~3.18.0",
|
||||||
"cross-env": "~7.0.3",
|
"cross-env": "~7.0.3",
|
||||||
"dns2": "~2.0.1",
|
"dns2": "~2.0.1",
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
beforeAll(() => {
|
const fs = require("fs");
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
fs.rmdirSync("./data/test", {
|
||||||
|
recursive: true,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
return console.log("Cleanup");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Very Simple Test", () => {
|
describe("Very Simple Test", () => {
|
||||||
|
|
||||||
const title = "Uptime Kuma";
|
const title = "Uptime Kuma";
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
@ -17,5 +20,19 @@ describe("Very Simple Test", () => {
|
||||||
it(`should be titled "${title}"`, async () => {
|
it(`should be titled "${title}"`, async () => {
|
||||||
await expect(page.title()).resolves.toMatch(title);
|
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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue