Archived
1
0

feat: add playwright

This commit is contained in:
Joe Previte
2021-01-26 14:44:23 -07:00
parent 966e9cc238
commit 66fe663e33
5 changed files with 155 additions and 2 deletions

21
test/e2e.test.ts Normal file
View File

@ -0,0 +1,21 @@
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")
})