- running test `npx ./node_modules/mocha/bin/mocha.js ./src/sample.test.ts`
## Issue
After upgrading chai 4.4.1 => 5.1.1 consistently getting Error:
Exception during run: TypeError: Unknown file extension ".ts" for ./src/sample.test.ts
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
at defaultLoad (node:internal/modules/esm/load:143:22)
at async ModuleLoader.load (node:internal/modules/esm/loader:409:7)
at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45)
at async link (node:internal/modules/esm/module_job:76:21) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Environment
Node 20.11.1
Dependencies
Tests configuration
describe('Simple Test', () => { it('should return true', () => { expect(true).to.be.true; }); });
Exception during run: TypeError: Unknown file extension ".ts" for ./src/sample.test.ts at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9) at defaultGetFormat (node:internal/modules/esm/get_format:203:36) at defaultLoad (node:internal/modules/esm/load:143:22) at async ModuleLoader.load (node:internal/modules/esm/loader:409:7) at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45) at async link (node:internal/modules/esm/module_job:76:21) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }