This removes the magic from the `inject` test helper that would inspect
the current zone and would only work with our `async` test helper.
Now, `inject` is always synchronous, and if you are using a module
that requires async precompilation, you're required to call
`doAsyncPrecompilation` in your tests.
This is part of the breaking changes introduced with the swap
to each test having an AppModule.
Closes#9975Closes#9593
BREAKING CHANGE:
`TestInjector` is now renamed to `TestBed`
Before:
```js
import {TestInjector, getTestInjector} from '@angular/core/testing';
```
After:
```js
import {TestBed, getTestBed} from '@angular/core/testing';
```
Adds new abstraction `Compiler` with methods
`compileComponentAsync` and `compileComponentSync`.
This is in preparation of deprecating `ComponentResolver`.
`compileComponentSync` is able to compile components
synchronously given all components either have an inline
template or they have been compiled before.
Also changes `TestComponentBuilder.createSync` to
take a `Type` and use the new `compileComponentSync` method.
Also supports overriding the component metadata even if
the component has already been compiled.
Also fixes#7084 in a better way.
BREAKING CHANGE:
`TestComponentBuilder.createSync` now takes a component type
and throws if not all templates are either inlined
are compiled before via `createAsync`.
Closes#9594
Mostly, removing things that were never intended to be exported publicy.
BREAKING CHANGE:
The following are no longer publicly exported APIs. They were intended as internal
utilities and you should use your own util:
```
browserDetection,
dispatchEvent,
el,
normalizeCSS,
stringifyElement,
expect (and custom matchers for Jasmine)
```