Run Functional Tests Using a Headless Browser - ensure done() error

Hello everyone, I’ve been trying to solve this challenge since yesterday and don’t know what my mistake is. I read through the forum posts and even tried to set up the challenge locally but everything failed. Copying the solution from the hints failed as well. Maybe I don’t see something clearly but let’s describe what the problem is:

let Browser = require('zombie');"";
suite('Functional Tests with Zombie.js', function () {
    let browser = new Browser();
    suiteSetup(function(done) {

        return browser.visit('/', done);

My Replit
Using this code leads me to see this error in the console:

 1) Functional Tests with Zombie.js
       "before all" hook in "Functional Tests with Zombie.js":
     Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/boilerplate-mochachai-3/tests/2_functional-tests.js)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

I don’t know where my mistake is. I’m using the files as provided with the Replit link on the challenge page. I only modified the code to solve the prior challenges.

browser info: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

link to challenge:

If anyone has an idea, thanks for helping.
Best wishes, Sedrunum

ok, problem solved:

I changed the timeout from 5 to 3s and that did the trick.

Don’t ask me why. Can’t explain

Have a nice day

Weird error…
Didn’t know about headless browsers, there are some neat tools in the firefox CLI binary, and also playwright, selenium, zombie, or webscrapping tools like beautiful soup (this not for testing)…

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.