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

22 lines
446 B
TypeScript
Raw Normal View History

2021-01-26 22:44:23 +01:00
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")
})