Solvedangular cli ng test ends with "Executed 0 of 0 ERROR"

I'm using Windows 10 (10.0.14388.0 (rs1_release.160709-1635)), node 6.9.1 and angular-cli 1.0.0-beta.18.

I created a new ng project with angular-cli and ran ng test. I got the following output:

λ ng test
23 10 2016 10:52:02.889:WARN [karma]: No captured browser, open http://localhost:9876/
23 10 2016 10:52:02.897:INFO [karma]: Karma v1.2.0 server started at http://localhost:9876/
23 10 2016 10:52:02.898:INFO [launcher]: Launching browser Chrome with unlimited concurrency
23 10 2016 10:52:02.909:INFO [launcher]: Starting browser Chrome
23 10 2016 10:52:03.840:INFO [Chrome 55.0.2883 (Windows 10 0.0.0)]: Connected on socket /#1G7vpI_QqAJgLKdyAAAA with id 55321352
Chrome 55.0.2883 (Windows 10 0.0.0): Executed 0 of 0 ERROR (0.003 secs / 0 secs)

I can't see any actual error message from the command line or from Karma's Chrome instance's console.

UPDATE: Actually this might be related to the warning "No capture browser" even though browser seems to open just fine.

31 Answers

✔️Accepted Answer

#2125

see @jtsom 's answer:
In the karma.conf.js file, add:
mime: { 'text/x-typescript': ['ts','tsx'] },
works for me.

Other Answers:

I still have the same error, and in my karma.conf.js I already have the mime defined

mime: { 'text/x-typescript': ['ts','tsx'] }, works for me, thanks @penghuili

More Issues: