Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

257
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda