Both chai and chai-as-promised packages with their version changes switch to the ECMAScript module system (ESM)
Different changes would have to be made.
so we can either:
stay on 7.x if we want to continue using commonjs.
migrate to ESM ("module": "nodenext / esnext", and set "type": "module" in our package.json.
or If we do not wish to set "type": "module" in package.json, we can rename the transpiled files to .mjs to indicate that they should be treated as ESM modules.
Both chai and chai-as-promised packages with their version changes switch to the ECMAScript module system (ESM) Different changes would have to be made.
so we can either:
stay on 7.x if we want to continue using commonjs. migrate to ESM ("module": "nodenext / esnext", and set "type": "module" in our package.json.
or If we do not wish to set "type": "module" in package.json, we can rename the transpiled files to .mjs to indicate that they should be treated as ESM modules.