no commonjs in main tsconfig.json but in test tsconfig.json
BugFinder2000 opened this issue · comments
BugFinder2000 commented
I have a Electron & Typescript project the main tsconfig.json dont use commonjs, so mocha-sidenar read the test files false. It cant detect typescript imports and so on,
I have this mocha.opts in the test folder:
--require ts-node/register
--require test/tshook.js
test/**/*.ts
test/tshook.js
bind the test tsconfig.json
file that have commonjs, but mocha-sidebar dont read my mocha.opts file.
What i need too set that it read test/mocha.opts
?
Description
test\Test.ts:1
(function (exports, require, module, __filename, __dirname) { import Test from '../../../src/Test';
SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Module.m._compile (c:\Users\danig\Desktop\VueElectron\list-manager\node_modules\ts-node\src\index.ts:473:23)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.require.extensions.(anonymous function) [as .ts] (c:\Users\danig\Desktop\VueElectron\list-manager\node_modules\ts-node\src\index.ts:476:12)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at c:\Users\danig\Desktop\VueElectron\list-manager\node_modules\mocha\lib\mocha.js:334:36
at Array.forEach (<anonymous>)
at Mocha.loadFiles (c:\Users\danig\Desktop\VueElectron\list-manager\node_modules\mocha\lib\mocha.js:331:14)
at Glob (c:\Users\danig\.vscode-insiders\extensions\maty.vscode-mocha-sidebar-0.22.2\lib\worker\findtests.js:86:15)
cant get tests Error: Mocha sidebar: Process exited with code 4294967295. See Mocha output for more info.
Settings file
"mocha.options": {
"compilers": "ts:ts-node/register"
},
"mocha.requires": [
"ts-node/register"
],
"mocha.files.glob": "test/**/*.ts",
Versions
- VScode: v1.37.0-insider
- Mocha SideBar: v0.22.2
- Node Version: v10.11.0
OS version
- Linux
- Mac
- Windows