Stock Checker - Final test failing

https://www.freecodecamp.org/learn/information-security/information-security-projects/stock-price-checker is the challenge

Here is my live app: https://boilerplate-project-stockchecker-5.fcc5743df.repl.co/

And code: https://replit.com/@fcc5743df/boilerplate-project-stockchecker-5

as you can see all but the last test are passing

What is wrong with my functional tests? I am trying to get this certificate and have progressed through all projects except this one.

Thanks

When you run the functional tests what does the error say?

I think this is the error: https://boilerplate-project-stockchecker-5.fcc5743df.repl.co/api/stock-prices/

TypeError: Cannot read property 'length' of undefined
    at /home/runner/boilerplate-project-stockchecker-5/routes/api.js:23:33
    at Layer.handle [as handle_request] (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/layer.js:95:5)
    at /home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/index.js:335:12)
    at next (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/index.js:275:10)
    at csp (/home/runner/boilerplate-project-stockchecker-5/node_modules/helmet-csp/dist/index.js:53:13)
    at Layer.handle [as handle_request] (/home/runner/boilerplate-project-stockchecker-5/node_modules/express/lib/router/layer.js:95:5)

All aspects of stock checker work save the functional tests in tests/2_functional-tests.js

Thanks for replying

Any feedback? thanks

i’ve been stuck on this same problem as well (functional tests not passing) for days now… PLEASE HELP!

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