Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

256
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda