refactor(compiler): don’t rely on global reflector (#16832)
Using the global reflector made it impossible to compile multiple programs at the same time.
This commit is contained in:

committed by
Chuck Jazdzewski

parent
de8d7c65f2
commit
50abca4583
@ -6,16 +6,19 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {JitReflector} from '@angular/compiler';
|
||||
import {Injector, Pipe} from '@angular/core';
|
||||
import {beforeEach, describe, expect, inject, it} from '@angular/core/testing/src/testing_internal';
|
||||
import {inject} from '@angular/core/testing';
|
||||
|
||||
import {MockPipeResolver} from '../testing';
|
||||
|
||||
export function main() {
|
||||
describe('MockPipeResolver', () => {
|
||||
let pipeResolver: MockPipeResolver;
|
||||
|
||||
beforeEach(inject(
|
||||
[Injector], (injector: Injector) => { pipeResolver = new MockPipeResolver(injector); }));
|
||||
beforeEach(inject([Injector], (injector: Injector) => {
|
||||
pipeResolver = new MockPipeResolver(injector, new JitReflector());
|
||||
}));
|
||||
|
||||
describe('Pipe overriding', () => {
|
||||
it('should fallback to the default PipeResolver when templates are not overridden', () => {
|
||||
|
Reference in New Issue
Block a user