mirror of
https://github.com/coder/code-server.git
synced 2024-11-28 05:03:35 +03:00
22 lines
446 B
TypeScript
22 lines
446 B
TypeScript
|
import { chromium, Page, Browser } from "playwright"
|
||
|
|
||
|
let browser: Browser
|
||
|
let page: Page
|
||
|
beforeAll(async () => {
|
||
|
browser = await chromium.launch()
|
||
|
})
|
||
|
afterAll(async () => {
|
||
|
await browser.close()
|
||
|
})
|
||
|
beforeEach(async () => {
|
||
|
page = await browser.newPage()
|
||
|
})
|
||
|
afterEach(async () => {
|
||
|
await page.close()
|
||
|
})
|
||
|
|
||
|
it("should work", async () => {
|
||
|
await page.goto("https://www.example.com/")
|
||
|
expect(await page.title()).toBe("Example Domain")
|
||
|
})
|