Error in compilation

Tell us what’s happening:
Hello. I am currently at “Run Functional Tests on an API Response using Chai-HTTP IV - PUT method” and I have completed the test case, but I am receiving an error and I can’t get pass it, even if I checked syntax errors.

SyntaxError: Unexpected token ‘)’
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at /home/runner/boilerplate-mochachai/node_modules/mocha/lib/mocha.js:231:27
at Array.forEach ()
at Mocha.loadFiles (/home/runner/boilerplate-mochachai/node_modules/mocha/lib/mocha.js:228:14)

Your project link(s)

https://boilerplate-mochachai.robertosz.repl.co

Your browser information:

Google Chrome Version 92.0.4515.131 (Official Build) (64-bit) / Windows 10 Enterprise / 64-bit

Challenge: Run Functional Tests on an API Response using Chai-HTTP IV - PUT method

Link to the challenge:

Here is what I would suggest. Copy the code from 2_functional-tests.js into VS Code. I would suggest using the Quokka extension and maybe also the Bracket Pair Colorizer 2 extension. See if you can’t trace the code better with some better syntax highlighting.

I can say, in test #4 you should look at the .end callback function.

Link to editor

Thank you for the help.
I’ve solved the issue. Indeed was a syntax problem

1 Like

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