-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng test
not reporting TypeScript errors
#5863
Comments
Having the same issue on MacOS and on Linux. |
Seeing same behavior as @mmmichl here: type error not detected on OSX, detected on Windows. One extra piece of info: this is only the case for the "first run"; when "ng test" is running in watch mode, the type error does get detected when the file with errors is modified (causing it to get recompiled), even on OSX. |
That's odd. @sumitarora, can you have a look? I work on windows so never came across this problem. #6160 might inadvertently fix this though. |
@filipesilva @jeffkenney @mmmichl @lpg-mac Tested the issue on Mac was able to easily replicate the issue. It has been fixed by #6160 and throws errors on a single run too. ~/w/o/t/foo master *… ng test --single-run 14s Mon 8 May 11:41:07 2017
10% building modules 1/1 modules 0 active08 05 2017 11:41:21.658:INFO [karma]: Karma v1.4.1 server started at http://0.0.0.0:9876/
08 05 2017 11:41:21.660:INFO [launcher]: Launching browser Chrome with unlimited concurrency
08 05 2017 11:41:21.663:INFO [launcher]: Starting browser Chrome
08 05 2017 11:41:26.262:ERROR [karma]: Error: /Users/sumitarora/workspace/open-source/temp/foo/src/app/app.component.spec.ts (16,12): Argument of type '1' is not assignable to parameter of type 'string'.
at Compiler.compiler.plugin (/Users/sumitarora/workspace/open-source/angular-cli/packages/@angular/cli/plugins/karma-webpack-throw-error.ts:10:23)
at Compiler.applyPlugins (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:61:14)
at Watching._done (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compiler.js:92:17)
at onCompiled (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compiler.js:51:17)
at /Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compiler.js:494:13
at next (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:138:11)
at Compiler.<anonymous> (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/CachePlugin.js:62:5)
at Compiler.applyPluginsAsyncSeries (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:142:13)
at /Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compiler.js:491:10
at Compilation.applyPluginsAsyncSeries (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:131:46)
at self.applyPluginsAsync.err (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:645:19)
at next (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:138:11)
at Compilation.compilation.plugin (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/ProgressPlugin.js:121:6)
at Compilation.applyPluginsAsyncSeries (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:142:13)
at self.applyPluginsAsync.err (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:636:11)
at next (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:138:11)
at Compilation.compilation.plugin (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/ProgressPlugin.js:117:6)
at Compilation.applyPluginsAsyncSeries (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:142:13)
at self.applyPluginsAsync.err (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:631:10)
at next (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:138:11)
at Compilation.compilation.plugin.callback (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/ProgressPlugin.js:113:6)
at Compilation.applyPluginsAsyncSeries (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:142:13)
at sealPart2 (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:627:9)
at next (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:138:11)
at Compilation.compilation.plugin (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/ProgressPlugin.js:109:6)
at Compilation.applyPluginsAsyncSeries (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:142:13)
at Compilation.seal (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:575:8)
at /Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compiler.js:488:16
at /Users/sumitarora/workspace/open-source/angular-cli/node_modules/tapable/lib/Tapable.js:225:11
at _addModuleChain (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:477:11)
at processModuleDependencies.err (/Users/sumitarora/workspace/open-source/angular-cli/node_modules/webpack/lib/Compilation.js:448:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
! ~/w/o/t/foo master *… ng --version 10.8s Mon 8 May 11:41:26 2017
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: local (v1.1.0-beta.0, branch: test-perf)
node: 7.5.0
os: darwin x64
@angular/animations: 4.1.1
@angular/common: 4.1.1
@angular/compiler: 4.1.1
@angular/core: 4.1.1
@angular/forms: 4.1.1
@angular/http: 4.1.1
@angular/language-service: 4.1.1
@angular/platform-browser: 4.1.1
@angular/platform-browser-dynamic: 4.1.1
@angular/router: 4.1.1
@angular/cli: error
@angular/compiler-cli: 4.1.1
~/w/o/t/foo master *… |
Fixed by #6160 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.0.0
node: 6.9.1
os: darwin x64 (El Capitan)
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
Repro steps.
ng new
src/app/app.component.spec.ts
ng test --single-run
and see that there are no errorstsc --project src/tsconfig.spec.json
and see a type errorThe log given by the failure.
No errors are reported. The code compiles and the tests pass.
Desired functionality.
The following compilation error should be reported and the tests should not be run:
The text was updated successfully, but these errors were encountered: