Welcome to the Linux Foundation Forum!

Chapter 16 Writing Unit Tests: tap test library is failing

Options

Hello @davidmarkclements

In the course, Chapter 16: Writing Unit Tests ---> tap Test Library: req.js

When I run the tests using the command ./node_modules/.bin/tap test/req.test.js, all my tests fail. I used the same examples provided in this course. Bellow is a screenshot

tap testing library failing

Here's my developement env configuration:

  • Node version: v18.18.1
  • Tap version: v18.7.2 (latest)

I tried many approaches, but I couldn't figure out what's wrong with that portion of code. Need help on this

Comments

  • xdxmxc
    xdxmxc Posts: 148
    Options

    hey @borelkoumo super weird - it looks as though the test is ending before the callback fires - I don't know if that's an update in latest tap but the content was written around tap 16 - so npm i tap@16 and see if that works

Categories

Upcoming Training