fix: make all tests green with new view engine and JIT
Note that this does not yet include enabling the view engine by default. Included refactoring: - view engine: split namespace of elements / attributes already when creating the `NodeDef` - view engine: when injecting the old `Renderer`, use an implementation that is based on `RendererV2` - view engine: store view queries in the component view, not on the host element
This commit is contained in:
@ -13,9 +13,14 @@ export function main() {
|
||||
describe('binding to CSS class list', () => {
|
||||
let fixture: ComponentFixture<any>;
|
||||
|
||||
function normalizeClassNames(classes: string) {
|
||||
return classes.trim().split(' ').sort().join(' ');
|
||||
}
|
||||
|
||||
function detectChangesAndExpectClassName(classes: string): void {
|
||||
fixture.detectChanges();
|
||||
expect(fixture.debugElement.children[0].nativeElement.className.trim()).toEqual(classes);
|
||||
let nonNormalizedClassName = fixture.debugElement.children[0].nativeElement.className;
|
||||
expect(normalizeClassNames(nonNormalizedClassName)).toEqual(normalizeClassNames(classes));
|
||||
}
|
||||
|
||||
function getComponent(): TestComponent { return fixture.debugElement.componentInstance; }
|
||||
|
Reference in New Issue
Block a user