code-server/test/e2e.test.ts

22 lines
446 B
TypeScript
Raw Normal View History

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