使用jest替换mocha
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { assert } from "chai";
|
||||
import { describe, it, expect } from '@jest/globals'
|
||||
import { chromium } from "playwright";
|
||||
|
||||
describe('平台', async function(){
|
||||
describe('平台', function(){
|
||||
|
||||
it('登陆', async function(){
|
||||
|
||||
@@ -29,13 +29,12 @@ describe('平台', async function(){
|
||||
await page.click('button:has-text("登录")');
|
||||
|
||||
let path = await page.evaluateHandle(()=>window.location.pathname);
|
||||
assert.notEqual('/user-login.html',await path.jsonValue());
|
||||
|
||||
expect(await path.jsonValue()).not.toEqual('/user-login.html')
|
||||
|
||||
// ---------------------
|
||||
after(async () => {
|
||||
await context.close();
|
||||
await browser.close();
|
||||
})
|
||||
await context.close();
|
||||
await browser.close();
|
||||
})
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user