Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

255
Views
Deno unit testing error No such file or directory (os error 2)

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

error code image

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!