Welcome to the Linux Foundation Forum!

Lab 16.1 - Test a Sync API failing.

I'm getting the following assertion error when running "node validate.js":

But I have added the test script in the package.json. When I run the command "npm test" I get all tap assertions passed.

This is my code:

Note: Can some one let me know how you are sharing code so that it displays as possible spoiler?

Comments

  • I added more validations and now the node validate.js passed. I used the command npm test -- --coverage-report=lcov for running the test and this opened a page with more details about the test. That is how I came with the conclusion, after adding more test, the node validate.js validations passed.

  • xdxmxc
    xdxmxc Posts: 110
    edited December 2022

    hey @jsalcedo nicely resolved. It seems to me that for whatever reason, tap is exiting with a non-zero code if coverage isn't 100%. Since no flags are passed, the only thing I can think of is perhaps there's a configuration setting (such as in a package.json or in a .taprc file) that is turning on that flag.

Categories

Upcoming Training