mocha test runner failing
See original GitHub issueHi, I’m trying out the latest test feature on alm, and the console is reporting
MOCHA STDERR: ...\node_modules\alm\src\server\workers\tested\runners\mochaInstrumenter.ts:9
import * as common from "./instrumenterCommon";
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
Error was reproduced on OS X as well as Windows 10, running Node 6.x.
$ npm list -g alm
`-- alm@2.0.2
$ typescript --init
$ typings init
$ typings install --global mocha
$ cat alm.json
{
"tests": {
"include": [
"./tests/*.ts"
]
}
}
$ cat tests/sample.ts
/// <reference path="../typings/index.d.ts" />
describe('simple test', () => {
it('adds 2 + 2', () => {
throw 'bad stuff'
})
})
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Mocha test fails without giving proper error - node.js
Answer to this problem was very quite simple. My node server was already running on port 3000. now when I ran npm test,...
Read more >Mocha exits with 0 exit code with failing tests #3893 - GitHub
Working to determine outside of our test suite. Running sub-suites alone seems to work fine, but running the entire suite does not. Possibly...
Read more >mocha not running tests after first failure - Google Groups
Mocha is the testrunner. Problem: Both tests run just fine if they pass. But when I force the first one to fail via...
Read more >Mocha | WebStorm Documentation - JetBrains
You can run Mocha tests from outside WebStorm, examine test results arranged in ... In the Test Runner tab, click Rerun Failed Tests...
Read more >Faster way to run, debug and view results of Mocha tests
Mocha test output is hard to read, search and act upon, especially when many tests are failing. 100. Wallaby test output is ergonomic, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@teyc thanks for the fix 🎉 🎈 ! What a great day to wake up to ❤️
Released with
2.0.4
🌹Thanks. Documenting this for someone like myself in the future - able to reproduce error executing
It appears that ts-config
shouldIgnore
is skipping the compilation of.ts
files because they occur in node_modules directory.https://github.com/TypeStrong/ts-node/blob/master/src/index.ts#L292-L294
The following patch fixes the issue