> test
> mocha ./test/**/*.spec.js
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/home/circleci/project/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///home/circleci/project/test/qa/qa.spec.js:13:14
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:437:15)
at async formattedImport (/home/circleci/project/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async Object.exports.requireOrImport (/home/circleci/project/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async Object.exports.loadFilesAsync (/home/circleci/project/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/home/circleci/project/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async Object.exports.handler (/home/circleci/project/node_modules/mocha/lib/cli/run.js:370:5)
Exited with code exit status 1
Tests were failing with:
This fixes that.