Angular 2 beforeEachProviders fail with Injector in tests


When I try to pass Injector to the beforeEachProviders in tests I get the following error.

Failed: Cannot resolve all parameters for 'Injector'(?, ?, ?, ?, ?).
Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'Injector' is decorated with Injectable.

The code I use

import { Injector } from 'angular2/core';

describe(() => {
  beforeEachProviders(() => [Injector]);

What is missing? What should I give to the providers to be able to instantiate it?

This video can help you solving your question :)
By: admin