style(lint): re-format modules/@angular
This commit is contained in:
@ -13,16 +13,16 @@ import {MyComp} from '../src/a/multiple_components';
|
||||
import {ReflectiveInjector, DebugElement, getDebugNode} from '@angular/core';
|
||||
import {browserPlatform, BROWSER_APP_PROVIDERS} from '@angular/platform-browser';
|
||||
|
||||
describe("template codegen output", () => {
|
||||
describe('template codegen output', () => {
|
||||
const outDir = 'src';
|
||||
|
||||
it("should lower Decorators without reflect-metadata", () => {
|
||||
it('should lower Decorators without reflect-metadata', () => {
|
||||
const jsOutput = path.join(outDir, 'basic.js');
|
||||
expect(fs.existsSync(jsOutput)).toBeTruthy();
|
||||
expect(fs.readFileSync(jsOutput, {encoding: 'utf-8'})).not.toContain('Reflect.decorate');
|
||||
});
|
||||
|
||||
it("should produce metadata.json outputs", () => {
|
||||
it('should produce metadata.json outputs', () => {
|
||||
const metadataOutput = path.join(outDir, 'basic.metadata.json');
|
||||
expect(fs.existsSync(metadataOutput)).toBeTruthy();
|
||||
const output = fs.readFileSync(metadataOutput, {encoding: 'utf-8'});
|
||||
@ -30,22 +30,22 @@ describe("template codegen output", () => {
|
||||
expect(output).toContain('"module":"@angular/core","name":"Component"');
|
||||
});
|
||||
|
||||
it("should write .d.ts files", () => {
|
||||
it('should write .d.ts files', () => {
|
||||
const dtsOutput = path.join(outDir, 'basic.d.ts');
|
||||
expect(fs.existsSync(dtsOutput)).toBeTruthy();
|
||||
expect(fs.readFileSync(dtsOutput, {encoding: 'utf-8'})).toContain('Basic');
|
||||
});
|
||||
|
||||
it("should be able to create the basic component", () => {
|
||||
const appInjector = ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS,
|
||||
browserPlatform().injector);
|
||||
it('should be able to create the basic component', () => {
|
||||
const appInjector =
|
||||
ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS, browserPlatform().injector);
|
||||
var comp = BasicNgFactory.create(appInjector);
|
||||
expect(comp.instance).toBeTruthy();
|
||||
});
|
||||
|
||||
it("should support ngIf", () => {
|
||||
const appInjector = ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS,
|
||||
browserPlatform().injector);
|
||||
it('should support ngIf', () => {
|
||||
const appInjector =
|
||||
ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS, browserPlatform().injector);
|
||||
var comp = BasicNgFactory.create(appInjector);
|
||||
var debugElement = <DebugElement>getDebugNode(comp.location.nativeElement);
|
||||
expect(debugElement.children.length).toBe(2);
|
||||
@ -56,9 +56,9 @@ describe("template codegen output", () => {
|
||||
expect(debugElement.children[2].injector.get(MyComp)).toBeTruthy();
|
||||
});
|
||||
|
||||
it("should support ngFor", () => {
|
||||
const appInjector = ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS,
|
||||
browserPlatform().injector);
|
||||
it('should support ngFor', () => {
|
||||
const appInjector =
|
||||
ReflectiveInjector.resolveAndCreate(BROWSER_APP_PROVIDERS, browserPlatform().injector);
|
||||
var comp = BasicNgFactory.create(appInjector);
|
||||
var debugElement = <DebugElement>getDebugNode(comp.location.nativeElement);
|
||||
expect(debugElement.children.length).toBe(2);
|
||||
|
Reference in New Issue
Block a user