Issue 1:
This happens both locally and on Travis.

You get something like this:

...
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 125 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 134 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 128 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 211 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 121 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 120 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 124 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 125 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 125 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 121 μs
[13:53:13] Starting 'cleanup.builder'...
[13:53:13] Finished 'cleanup.builder' after 129 μs
[13:53:13] Starting 'cleanup.builder'...
...

Issue 2:
I'm submitting a ...

bug report

Current behavior

I'm using ComponentResolver to render dynamically 'some'(all names - just alias) component to custom selector on a body.

Like that:

class SomeClass {
constructor(private resolver:ComponentResolver, private injector:Injector, private appRef:ApplicationRef) {
}

public renderComponent() {
return this.resolver
.resolveComponent(SomeComponent)
.then((factory:ComponentFactory<SomeComponent>) => {
let cmpRef:ComponentRef<SomeComponent> = factory.create(this.injector, null, `.some-class`);
(<any>this.appRef)._loadComponent(cmpRef);
return cmpRef;
});
}
}

This works for application itself. But when I try to test it (Jasmine 2.4 and Karma, Webpack for test build):

import {it, inject, describe, expect, beforeEach, beforeEachProviders, fakeAsync, tick} from '@angular/core/testing';
import {ComponentResolver, Injector, ApplicationRef, provide} from '@angular/core';
import {ReflectorComponentResolver} from '@angular/core/src/linker/component_resolver';
import {SomeClass} from './some-class';

describe('SomeClass', () => {
let someClassInstance:SomeClass;
let resolver:ComponentResolver;

beforeEachProviders(() => [
provide(ComponentResolver, {
useClass: ReflectorComponentResolver
}),
Injector,
ApplicationRef,
SomeClass
]);

beforeEach(inject([ComponentResolver, SomeClass],
(cmpRes:ComponentResolver, someClass:SomeClass) => {
resolver = cmpRes;
someClassInstance = someClass;
}));

it('renderComponent method should render component', fakeAsync(() => {
spyOn(resolver, 'resolveComponent').and.callThrough();
someClassInstance.renderComponent();
tick();

expect(resolver.resolveComponent).toHaveBeenCalled();
}));
});

ReflectorComponentResolver(I'm using it, because ComponentResolver is just an abstract class) throws an exception:

Error: No precompiled component SomeComponent found

And for sure promise is never resolved.

Expected/desired behavior

I would like ComponentResolver(or any inherited class) to resolve component in unit tests. Or it would be great to provide any documentation - how to avoid it, if this behavior is expected.

Angular version: 2.0.0-rc.1

Browser: [ PhantomJS2 ]

Language: [ TypeScript 1.9 ]