使用jest替换mocha

This commit is contained in:
xief
2024-08-02 09:50:12 +08:00
parent 941e8a1d8e
commit b5d651d7ca
9 changed files with 2754 additions and 93 deletions

View File

@@ -1,4 +1,4 @@
import { assert } from "chai";
import { describe, it, expect } from '@jest/globals'
import { chromium } from "playwright";
describe("mes登录", function () {
@@ -32,13 +32,12 @@ describe("mes登录", function () {
await page.waitForTimeout(1000)
let path = await page.evaluateHandle(()=>window.location.hash.substr(1))
assert.equal('/dashboard',await path.jsonValue());
expect(await path.jsonValue()).toEqual('/dashboard')
after(async function(){
await context.close();
await browser.close();
})
// ---------------------
await context.close();
await browser.close();
})
})