style(lint): re-format modules/@angular
This commit is contained in:
@ -1,34 +1,15 @@
|
||||
import {
|
||||
AsyncTestCompleter,
|
||||
beforeEach,
|
||||
ddescribe,
|
||||
xdescribe,
|
||||
describe,
|
||||
expect,
|
||||
iit,
|
||||
inject,
|
||||
it,
|
||||
xit,
|
||||
beforeEachProviders
|
||||
} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {trigger, style, animate, group, sequence, transition, AnimationMetadata} from '@angular/core';
|
||||
import {AnimationMetadata, animate, group, sequence, style, transition, trigger} from '@angular/core';
|
||||
import {AsyncTestCompleter, beforeEach, beforeEachProviders, ddescribe, describe, expect, iit, inject, it, xdescribe, xit} from '@angular/core/testing/testing_internal';
|
||||
|
||||
import {AnimationCompiler, CompiledAnimation} from '../../src/animation/animation_compiler';
|
||||
import {
|
||||
CompileTemplateMetadata,
|
||||
CompileDirectiveMetadata,
|
||||
CompileTypeMetadata
|
||||
} from '../../src/compile_metadata';
|
||||
|
||||
import {CompileDirectiveMetadata, CompileTemplateMetadata, CompileTypeMetadata} from '../../src/compile_metadata';
|
||||
import {CompileMetadataResolver} from '../../src/metadata_resolver';
|
||||
|
||||
export function main() {
|
||||
describe('RuntimeAnimationCompiler', () => {
|
||||
var resolver: any /** TODO #9100 */;
|
||||
beforeEach(inject([CompileMetadataResolver], (res: CompileMetadataResolver) => {
|
||||
resolver = res;
|
||||
}));
|
||||
beforeEach(
|
||||
inject([CompileMetadataResolver], (res: CompileMetadataResolver) => { resolver = res; }));
|
||||
|
||||
var compiler = new AnimationCompiler();
|
||||
|
||||
@ -37,18 +18,12 @@ export function main() {
|
||||
};
|
||||
|
||||
var compile = (seq: AnimationMetadata) => {
|
||||
var entry = trigger('myAnimation', [
|
||||
transition('state1 => state2', seq)
|
||||
]);
|
||||
var entry = trigger('myAnimation', [transition('state1 => state2', seq)]);
|
||||
|
||||
var compiledAnimationEntry = resolver.getAnimationEntryMetadata(entry);
|
||||
var component = CompileDirectiveMetadata.create({
|
||||
type: new CompileTypeMetadata({
|
||||
name: 'something'
|
||||
}),
|
||||
template: new CompileTemplateMetadata({
|
||||
animations: [compiledAnimationEntry]
|
||||
})
|
||||
type: new CompileTypeMetadata({name: 'something'}),
|
||||
template: new CompileTemplateMetadata({animations: [compiledAnimationEntry]})
|
||||
});
|
||||
|
||||
return compileAnimations(component);
|
||||
@ -56,12 +31,9 @@ export function main() {
|
||||
|
||||
it('should throw an exception containing all the inner animation parser errors', () => {
|
||||
var animation = sequence([
|
||||
style({"color": "red"}),
|
||||
animate(1000, style({"font-size": "100px"})),
|
||||
style({"color": "blue"}),
|
||||
animate(1000, style(":missing_state")),
|
||||
style({"color": "gold"}),
|
||||
animate(1000, style("broken_state"))
|
||||
style({'color': 'red'}), animate(1000, style({'font-size': '100px'})),
|
||||
style({'color': 'blue'}), animate(1000, style(':missing_state')), style({'color': 'gold'}),
|
||||
animate(1000, style('broken_state'))
|
||||
]);
|
||||
|
||||
var capturedErrorMessage: string;
|
||||
@ -72,8 +44,7 @@ export function main() {
|
||||
}
|
||||
|
||||
expect(capturedErrorMessage)
|
||||
.toMatchPattern(
|
||||
/Unable to apply styles due to missing a state: "missing_state"/g);
|
||||
.toMatchPattern(/Unable to apply styles due to missing a state: "missing_state"/g);
|
||||
|
||||
expect(capturedErrorMessage)
|
||||
.toMatchPattern(/Animation states via styles must be prefixed with a ":"/);
|
||||
|
Reference in New Issue
Block a user