Quality Assurance and Testing with Chai - Simulate Actions Using a Headless Browser

I have tried running the project locally but I get the same error in vscode as in replit:

Functional Tests with Zombie.js
    1) "before all" hook in "Functional Tests with Zombie.js"


  22 passing (121ms)
  1 failing

  1) Functional Tests with Zombie.js
       "before all" hook in "Functional Tests with Zombie.js":
     TypeError: write EPROTO 3344:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:
...

I get the 3 dots under “zombie” when i try const Browser = require("zombie")
It has no quick fix available and it basically says it could not find a declaration file for module ‘zombie’.

I have tried npm i --save-dev @types/zombie and npm info @types/zombie but both return

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2fzombie - Not found
npm ERR! 404
npm ERR! 404  '@types/zombie@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

I also tried npm install and npm install zombie --save-dev with no luck.
I have the ES7+ React/Redux/React-Native snippets extension installed on vscode and from googling around I read it might have to do with a linter in vscode so I currently trying to check that.

Has anyone solved this before? Help please and thank you!

Your code so far

const Browser = require("zombie");
Browser.site = 'https://localhost:3000/';

suite('Functional Tests with Zombie.js', function () {
  this.timeout(5000);
  const browser = new Browser();
  suiteSetup(function(done) {
    return browser.visit('/', done);
  });


  suite('Headless browser', function () {
    test('should have a working "site" property', function() {
      assert.isNotNull(browser.site);
    });
  });

  suite('"Famous Italian Explorers" form', function () {
    // #5
    test('Submit the surname "Colombo" in the HTML form', function (done) {
      assert.fail();

      done();
    });
    // #6
    test('Submit the surname "Vespucci" in the HTML form', function (done) {
      assert.fail();

      done();
    });
  });
});
after(function() {
  chai.request(server)
    .get('/')
  });

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 OPR/96.0.0.0 (Edition std-1)

Challenge: Quality Assurance and Testing with Chai - Simulate Actions Using a Headless Browser

Link to the challenge:

You’ll really have to post a link to a repl to get any real debugging as there is no way to debug a local setup.

These exercises work on replit but they are finicky. Follow the instructions exactly. Try to run the tests immediately after starting the repl. There has been plenty of discussion of these projects in the forums, but no real resolution of the finickiness.

Please link to your Replit.

It is just saying it can’t find the type definitions and I don’t think there are any for zombie.js (it is super old). You can just ignore it.

The SSL error is not related to what you are talking about. You shouldn’t need HTTPS for the localhost.

Sorry I forgot to add the link to my replit : boilerplate-mochachai - Replit

Hi, you were right, I literally removed the “s” and then I could clear the test. Thank you!

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