Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/e2e.test.ts
2021-02-01 15:11:28 -07:00

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")
})