Tell us what’s happening:
I cant figure out how to resolve the error that is showing in replit. I followed the instruction and consult the hint indicated in the exercise. I hope someone can shed a light on the issue that I have.
npm start
> automated-testing-app@0.0.1 start /home/runner/boilerplate-mochachai
> node server.js
Listening on port 3000
Running Tests...
Tests are not valid:
ReferenceError: functions is not defined
at Object.<anonymous> (/home/runner/boilerplate-mochachai/tests/1_unit-tests.js:4:21)
at Module._compile (internal/modules/cjs/loader.js:999:30)
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:430:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (/home/runner/boilerplate-mochachai/node_modules/mocha/lib/mocha.js:427:14)
Your code so far
const chai= require('chai');
const assert =chai.assert;
suite('Unit Tests', functions)()
{
suite('Basic Assertions', function()
{
test('#isNull, #isNotNull', function()
{
assert.isNull(null,'This is an optional error description - e.g. null is null');
assert.isNotNull(1, '1 is not null');
});
});
};
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge: Quality Assurance and Testing with Chai - Learn How JavaScript Assertions Work
Link to the challenge: