Hey dont know if im being silly im trying to learn unit testing with deno and keep getting this error im using puppeteer if thats relevant cant figure out whats wrong it seems to be pointing to the await in this line
const browser = await puppeteer.launch({ headless: true })
Deno.test('log in with invalid username/password', async test => {
// GIVEN I am on the "Log In" page
const browser = await puppeteer.launch({ headless: true })
const page = await browser.newPage()
await page.goto(url, { waitUntil: 'networkidle0' })
await page.click('a[href="/login"]', { waitUntil: 'networkidle0' })
// WHEN I enter "fakeuser" in the username field
await page.type('input[name="username"]', 'fakeuser')
// AND I enter "fakepassword" in the password field
await page.type('input[name="password"]', 'fakepassword')
// AND I click on the login button
await page.click('input[type="submit"]', { waitUntil: 'networkidle0' })
// THEN I should be returned to the "Log In" page
const heading = await page.$eval('h1', node => node.innerText)
await assertEquals(heading, 'Log In', 'invalid credentials dont send user back to login page')
await browser.close()
})