Title: ng test does not honor tsconfig.json compilation options · Issue #3911 · angular/angular-cli · GitHub
Open Graph Title: ng test does not honor tsconfig.json compilation options · Issue #3911 · angular/angular-cli
X Title: ng test does not honor tsconfig.json compilation options · Issue #3911 · angular/angular-cli
Description: OS? OS X El Cap. Versions. angular-cli: 1.0.0-beta.24 node: 6.9.1 os: darwin x64 @angular/common: 2.4.2 @angular/compiler: 2.4.2 @angular/core: 2.4.2 @angular/forms: 2.4.2 @angular/http: 2.4.2 @angular/platform-browser: 2.4.2 @angular/pl...
Open Graph Description: OS? OS X El Cap. Versions. angular-cli: 1.0.0-beta.24 node: 6.9.1 os: darwin x64 @angular/common: 2.4.2 @angular/compiler: 2.4.2 @angular/core: 2.4.2 @angular/forms: 2.4.2 @angular/http: 2.4.2 @ang...
X Description: OS? OS X El Cap. Versions. angular-cli: 1.0.0-beta.24 node: 6.9.1 os: darwin x64 @angular/common: 2.4.2 @angular/compiler: 2.4.2 @angular/core: 2.4.2 @angular/forms: 2.4.2 @angular/http: 2.4.2 @ang...
Opengraph URL: https://github.com/angular/angular-cli/issues/3911
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ng test does not honor tsconfig.json compilation options","articleBody":"### OS?\r\nOS X El Cap.\r\n\r\n### Versions.\r\n```\r\nangular-cli: 1.0.0-beta.24\r\nnode: 6.9.1\r\nos: darwin x64\r\n@angular/common: 2.4.2\r\n@angular/compiler: 2.4.2\r\n@angular/core: 2.4.2\r\n@angular/forms: 2.4.2\r\n@angular/http: 2.4.2\r\n@angular/platform-browser: 2.4.2\r\n@angular/platform-browser-dynamic: 2.4.2\r\n@angular/router: 3.4.2\r\n@angular/compiler-cli: 2.4.2\r\n```\r\n\r\n### Repro steps.\r\nUse this repo: https://github.com/JohannesRudolph/angular-cli-rxjs-repro/tree/test-strict-null-check\r\n\r\nIt has `\"strictNullChecks\": true` in both tsconfig.json files and a `.spec` file with the following test that tsc in my editor (VSCode) correctly flags with null check errors: \r\n\r\n```\r\ndescribe('AppComponent', () => {\r\n beforeEach(() => {\r\n });\r\n\r\n it('violating null check should raise compilation error', () => {\r\n let string = '';\r\n string = null;\r\n\r\n const array = [];\r\n array.push(1);\r\n });\r\n});\r\n\r\n```\r\n\r\nHowever, when I run `ng test` I get none of these errors. \r\n\r\n\r\n### The log given by the failure\r\nI get the following log: \r\n\r\n```\r\niDevBook01:observable-repro jr$ ng test\r\n09 01 2017 09:25:52.623:WARN [watcher]: Pattern \"/Users/jr/dev/tmp/observable-repro/src/assets/**\" does not match any file.\r\n09 01 2017 09:26:02.000:WARN [karma]: No captured browser, open http://localhost:9876/ \r\n09 01 2017 09:26:02.008:WARN [karma]: Port 9876 in use\r\n09 01 2017 09:26:02.008:INFO [karma]: Karma v1.2.0 server started at http://localhost:9877/\r\n09 01 2017 09:26:02.009:INFO [launcher]: Launching browser Chrome with unlimited concurrency\r\n09 01 2017 09:26:02.015:INFO [launcher]: Starting browser Chrome\r\n09 01 2017 09:26:03.113:INFO [Chrome 55.0.2883 (Mac OS X 10.11.6)]: Connected on socket /#Ey3SzNdnfw0H2k6BAAAA with id 38623434\r\nChrome 55.0.2883 (Mac OS X 10.11.6): Executed 1 of 1 SUCCESS (0.009 secs / 0.002 secs)\r\n```\r\n\r\n### Mention any other details that might be useful.\r\nThis issue may be somewhat related to (but its for sure not the same one) as https://github.com/angular/angular-cli/issues/2778","author":{"url":"https://github.com/JohannesRudolph","@type":"Person","name":"JohannesRudolph"},"datePublished":"2017-01-09T08:27:34Z","url":"https://github.com/angular/angular-cli/issues/3911"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a5032cb2-409d-af0a-e522-f40e1b4e3121 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD52:2E124E:411D79C:5316487:6B0231BE |
| html-safe-nonce | d4816f93a88cd0c7a60c82506854e46077db82aec195851088687d439912ad88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDUyOjJFMTI0RTo0MTFENzlDOjUzMTY0ODc6NkIwMjMxQkUiLCJ2aXNpdG9yX2lkIjoiNDQxMTg1MTUyMTMzNjE2MDcwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d1e8171e9c97d21e2eda62a018df965e6b2eb433b215dcadab47a79c3e26b5d6 |
| hovercard-subject-tag | issue:199498732 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/3911/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6c3f2f54113babd83ac8440709e0cb46990fc857a53b711a346e522422e7f82a/angular/angular-cli/issues/3911 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6c3f2f54113babd83ac8440709e0cb46990fc857a53b711a346e522422e7f82a/angular/angular-cli/issues/3911 |
| og:image:alt | OS? OS X El Cap. Versions. angular-cli: 1.0.0-beta.24 node: 6.9.1 os: darwin x64 @angular/common: 2.4.2 @angular/compiler: 2.4.2 @angular/core: 2.4.2 @angular/forms: 2.4.2 @angular/http: 2.4.2 @ang... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JohannesRudolph |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width