<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> bug report =&gt; search github for a similar issue or PR before submitting</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> feature request</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> support request =&gt; Please do not submit support request here, instead see <a href="https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question">https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question</a></li>
</ul>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Almost all methods of <code class="notranslate">AbstractControl</code> aren't being shown on <a href="https://angular.io/docs/ts/latest/api/forms/index/AbstractControl-class.html" rel="nofollow">https://angular.io/docs/ts/latest/api/forms/index/AbstractControl-class.html</a></p>
<p dir="auto">Full list:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
setValidators(newValidator: ValidatorFn|ValidatorFn[]): void  

setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]): void

clearValidators(): void

clearAsyncValidators(): void

markAsTouched({onlySelf}: {onlySelf?: boolean} = {}): void

markAsUntouched({onlySelf}: {onlySelf?: boolean} = {}): void

markAsDirty({onlySelf}: {onlySelf?: boolean} = {}): void

markAsPristine({onlySelf}: {onlySelf?: boolean} = {}): void

markAsPending({onlySelf}: {onlySelf?: boolean} = {}): void

disable({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}): void

enable({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}): void

setParent(parent: FormGroup|FormArray): void

updateValueAndValidity({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}):
    void

setErrors(errors: ValidationErrors|null, {emitEvent}: {emitEvent?: boolean} = {}): void      

get(path: Array&lt;string|number&gt;|string): AbstractControl

getError(errorCode: string, path: string[] = null): any

hasError(errorCode: string, path: string[] = null): boolean

get root(): AbstractControl"><pre class="notranslate"><code class="notranslate">
setValidators(newValidator: ValidatorFn|ValidatorFn[]): void  

setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]): void

clearValidators(): void

clearAsyncValidators(): void

markAsTouched({onlySelf}: {onlySelf?: boolean} = {}): void

markAsUntouched({onlySelf}: {onlySelf?: boolean} = {}): void

markAsDirty({onlySelf}: {onlySelf?: boolean} = {}): void

markAsPristine({onlySelf}: {onlySelf?: boolean} = {}): void

markAsPending({onlySelf}: {onlySelf?: boolean} = {}): void

disable({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}): void

enable({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}): void

setParent(parent: FormGroup|FormArray): void

updateValueAndValidity({onlySelf, emitEvent}: {onlySelf?: boolean, emitEvent?: boolean} = {}):
    void

setErrors(errors: ValidationErrors|null, {emitEvent}: {emitEvent?: boolean} = {}): void      

get(path: Array&lt;string|number&gt;|string): AbstractControl

getError(errorCode: string, path: string[] = null): any

hasError(errorCode: string, path: string[] = null): boolean

get root(): AbstractControl
</code></pre></div>
<p dir="auto"><strong>Expected behavior</strong></p>

<h2 dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></h2>
<h2 dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></h2>
<h2 dir="auto"><strong>Please tell us about your environment:</strong></h2>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 4.0.X</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]<br>
All</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
All</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p>
</li>
</ul>
<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>

<p dir="auto">The Angular 2 Component Testing in RC 6 works accurately using Jasmine and Karma. It produces desired results by executing all tests in the 'spec.ts' file (for Component and Service). But when the application is migrated to Angular 2 final release. The Browser testing fails when the test.html is viewed in the browser (IE/Chrome/Firefox)  with the following error</p>
<p dir="auto">TypeError: Cannot read property 'spies' of undefined<br>
at currentSpies (<a href="http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:803:53" rel="nofollow">http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:803:53</a>)<br>
at SpyRegistry.clearSpies (<a href="http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2123:19" rel="nofollow">http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2123:19</a>)<br>
at clearResourcesForRunnable (<a href="http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:615:21" rel="nofollow">http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:615:21</a>)<br>
at <a href="http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:777:9" rel="nofollow">http://localhost:8000/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:777:9</a><br>
at ZoneDelegate.invokeTask (<a href="http://localhost:8000/node_modules/zone.js/dist/zone.js:236:37" rel="nofollow">http://localhost:8000/node_modules/zone.js/dist/zone.js:236:37</a>)<br>
at Zone.runTask (<a href="http://localhost:8000/node_modules/zone.js/dist/zone.js:136:47" rel="nofollow">http://localhost:8000/node_modules/zone.js/dist/zone.js:136:47</a>)<br>
at drainMicroTaskQueue (<a href="http://localhost:8000/node_modules/zone.js/dist/zone.js:368:35" rel="nofollow">http://localhost:8000/node_modules/zone.js/dist/zone.js:368:35</a>)<br>
at ZoneTask.invoke (<a href="http://localhost:8000/node_modules/zone.js/dist/zone.js:308:25" rel="nofollow">http://localhost:8000/node_modules/zone.js/dist/zone.js:308:25</a>)</p>
<p dir="auto"><strong>Expected behavior</strong></p>

<p dir="auto">The expected accurate behavior is that the browser should show all test either passed or failed (as per the test data).</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong></p>

<p dir="auto">Create an application using Visual Studio Code<br>
Install necessary dependencies using npm install. The package.json is as following</p>
<p dir="auto">"dependencies": {<br>
"@angular/common": "2.0.0",<br>
"@angular/compiler": "2.0.0",<br>
"@angular/core": "2.0.0",<br>
"@angular/forms": "2.0.0",<br>
"@angular/http": "2.0.0",<br>
"@angular/platform-browser": "2.0.0",<br>
"@angular/platform-browser-dynamic": "2.0.0",<br>
"@angular/router": "3.0.1",<br>
"reflect-metadata": "0.1.8",<br>
"core-js": "2.4.1",<br>
"rxjs": "5.0.0-beta.12",<br>
"systemjs": "0.19.39",<br>
"zone.js": "0.6.25",</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;bootstrap&quot;: &quot;3.3.7&quot;,
&quot;jquery&quot;: &quot;3.1.1&quot;,

&quot;express&quot;: &quot;4.14.0&quot;,
&quot;ws&quot;: &quot;1.1.1&quot;"><pre class="notranslate"><code class="notranslate">"bootstrap": "3.3.7",
"jquery": "3.1.1",

"express": "4.14.0",
"ws": "1.1.1"
</code></pre></div>
<p dir="auto">},<br>
"devDependencies": {<br>
"@types/es6-shim": "0.31.32",<br>
"@types/express": "4.0.33",<br>
"@types/jasmine": "2.2.34",<br>
"@types/ws": "0.0.33",</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;jasmine-core&quot;: &quot;2.5.2&quot;,
&quot;karma&quot;: &quot;1.3.0&quot;,
&quot;karma-chrome-launcher&quot;: &quot;2.0.0&quot;,
&quot;karma-firefox-launcher&quot;: &quot;1.0.0&quot;,
&quot;karma-jasmine&quot;: &quot;1.0.2&quot;,

&quot;nodemon&quot;: &quot;1.10.2&quot;,
&quot;typescript&quot;: &quot;2.0.3&quot;"><pre class="notranslate"><code class="notranslate">"jasmine-core": "2.5.2",
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-firefox-launcher": "1.0.0",
"karma-jasmine": "1.0.2",

"nodemon": "1.10.2",
"typescript": "2.0.3"
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">The Component</p>
<p dir="auto">import {Component, ViewEncapsulation} from '@angular/core';</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/component/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/component">@component</a>({<br>
selector: 'my-application',<br>
templateUrl: 'app/application.html'<br>
})<br>
export default class AppComponent {}</p>
<p dir="auto">The Test spec is app.spec.ts</p>
<p dir="auto">import AppComponent from './app';</p>
<p dir="auto">describe('AppComponent', () =&gt; {<br>
it('is true', () =&gt; {<br>
let app = new AppComponent();<br>
expect(app instanceof AppComponent).toEqual(true);<br>
});<br>
});</p>
<p dir="auto">References in test.html are as follows</p>
  
  &lt;script src="node_modules/typescript/lib/typescript.js"&gt;&lt;/script&gt;
  
  &lt;script src="node_modules/reflect-metadata/Reflect.js"&gt;&lt;/script&gt;
  
  
  &lt;script src="node_modules/jasmine-core/lib/jasmine-core/jasmine.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/jasmine-core/lib/jasmine-core/boot.js"&gt;&lt;/script&gt;
  
  &lt;script src="node_modules/zone.js/dist/zone.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/zone.js/dist/proxy.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/zone.js/dist/sync-test.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/zone.js/dist/jasmine-patch.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/zone.js/dist/async-test.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/zone.js/dist/fake-async-test.js"&gt;&lt;/script&gt;
  &lt;script src="node_modules/zone.js/dist/long-stack-trace-zone.js"&gt;&lt;/script&gt;
  
  &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
  &lt;script src="systemjs.config.js"&gt;&lt;/script&gt;
&lt;script&gt;
  var test_modules = [
    'app/app.spec',
      ];

  Promise.all([
    System.import('@angular/core/testing'),
    System.import('@angular/platform-browser-dynamic/testing')
  ])
          .then(function (modules) {
            var cp= modules[0];
       

            cp.TestBed.initTestEnvironment(
                    browser.BrowserDynamicTestingModule,
                    browser.platformBrowserDynamicTesting());

            // Load all the spec files.
            return Promise.all(test_modules.map(function (module) {
              return System.import(module);
            }));
          })
          .then(window.onload)
          .catch(console.error.bind(console));
&lt;/script&gt;
<p dir="auto"><strong>Please tell us about your environment:</strong></p>

<p dir="auto">OS : Windows 10 Professional<br>
IDE: Visual Studio Code<br>
Node Package Manager<br>
Express  HTTP Server (Even tested on Koa)</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 2.0.X</p>

<p dir="auto">Angular 2.0 Final Release</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</p>

<p dir="auto">Chrome, IE, Firefox</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
TypeScript Language is  used</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p>
</li>
</ul>