@@ -44,8 +44,11 @@ describe('CDK drag-drop schematic', () => {
4444
4545 describe ( 'style option' , ( ) => {
4646 it ( 'should respect the option value' , async ( ) => {
47- const tree = await runner . runSchematicAsync (
48- 'drag-drop' , { style : 'scss' , ...baseOptions } , await createTestApp ( runner ) ) . toPromise ( ) ;
47+ const tree =
48+ await runner
49+ . runSchematicAsync (
50+ 'drag-drop' , { style : 'scss' , ...baseOptions } , await createTestApp ( runner ) )
51+ . toPromise ( ) ;
4952
5053 expect ( tree . files ) . toContain ( '/projects/material/src/app/foo/foo.component.scss' ) ;
5154 } ) ;
@@ -68,21 +71,30 @@ describe('CDK drag-drop schematic', () => {
6871 } ) ;
6972
7073 it ( 'should not generate invalid stylesheets' , async ( ) => {
71- const tree = await runner . runSchematicAsync (
72- 'drag-drop' , { style : 'styl' , ...baseOptions } , await createTestApp ( runner ) ) . toPromise ( ) ;
74+ const tree =
75+ await runner
76+ . runSchematicAsync (
77+ 'drag-drop' , { style : 'styl' , ...baseOptions } , await createTestApp ( runner ) )
78+ . toPromise ( ) ;
7379
7480 // In this case we expect the schematic to generate a plain "css" file because
7581 // the component schematics are using CSS style templates which are not compatible
7682 // with all CLI supported styles (e.g. Stylus or Sass)
77- expect ( tree . files ) . toContain ( '/projects/material/src/app/foo/foo.component.css' ,
78- 'Expected the schematic to generate a plain "css" file.' ) ;
79- expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.styl' ,
80- 'Expected the schematic to not generate a "stylus" file' ) ;
83+ expect ( tree . files )
84+ . toContain (
85+ '/projects/material/src/app/foo/foo.component.css' ,
86+ 'Expected the schematic to generate a plain "css" file.' ) ;
87+ expect ( tree . files )
88+ . not . toContain (
89+ '/projects/material/src/app/foo/foo.component.styl' ,
90+ 'Expected the schematic to not generate a "stylus" file' ) ;
8191 } ) ;
8292
8393 it ( 'should fall back to the @schematics/angular:component option value' , async ( ) => {
84- const tree = await runner . runSchematicAsync (
85- 'drag-drop' , baseOptions , await createTestApp ( runner , { style : 'less' } ) ) . toPromise ( ) ;
94+ const tree = await runner
95+ . runSchematicAsync (
96+ 'drag-drop' , baseOptions , await createTestApp ( runner , { style : 'less' } ) )
97+ . toPromise ( ) ;
8698
8799 expect ( tree . files ) . toContain ( '/projects/material/src/app/foo/foo.component.less' ) ;
88100 } ) ;
@@ -91,15 +103,19 @@ describe('CDK drag-drop schematic', () => {
91103 describe ( 'inlineStyle option' , ( ) => {
92104 it ( 'should respect the option value' , async ( ) => {
93105 const app = await createTestApp ( runner ) ;
94- const tree = await runner . runSchematicAsync (
95- 'drag-drop' , { inlineStyle : true , ...baseOptions } , app ) . toPromise ( ) ;
106+ const tree =
107+ await runner . runSchematicAsync ( 'drag-drop' , { inlineStyle : true , ...baseOptions } , app )
108+ . toPromise ( ) ;
96109
97110 expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.css' ) ;
98111 } ) ;
99112
100113 it ( 'should fall back to the @schematics/angular:component option value' , async ( ) => {
101- const tree = await runner . runSchematicAsync (
102- 'drag-drop' , baseOptions , await createTestApp ( runner , { inlineStyle : true } ) ) . toPromise ( ) ;
114+ const tree =
115+ await runner
116+ . runSchematicAsync (
117+ 'drag-drop' , baseOptions , await createTestApp ( runner , { inlineStyle : true } ) )
118+ . toPromise ( ) ;
103119
104120 expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.css' ) ;
105121 } ) ;
@@ -108,8 +124,9 @@ describe('CDK drag-drop schematic', () => {
108124 describe ( 'inlineTemplate option' , ( ) => {
109125 it ( 'should respect the option value' , async ( ) => {
110126 const app = await createTestApp ( runner ) ;
111- const tree = await runner . runSchematicAsync (
112- 'drag-drop' , { inlineTemplate : true , ...baseOptions } , app ) . toPromise ( ) ;
127+ const tree =
128+ await runner . runSchematicAsync ( 'drag-drop' , { inlineTemplate : true , ...baseOptions } , app )
129+ . toPromise ( ) ;
113130
114131 expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.html' ) ;
115132 } ) ;
@@ -124,8 +141,11 @@ describe('CDK drag-drop schematic', () => {
124141
125142 describe ( 'skipTests option' , ( ) => {
126143 it ( 'should respect the option value' , async ( ) => {
127- const tree = await runner . runSchematicAsync (
128- 'drag-drop' , { skipTests : true , ...baseOptions } , await createTestApp ( runner ) ) . toPromise ( ) ;
144+ const tree =
145+ await runner
146+ . runSchematicAsync (
147+ 'drag-drop' , { skipTests : true , ...baseOptions } , await createTestApp ( runner ) )
148+ . toPromise ( ) ;
129149
130150 expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.spec.ts' ) ;
131151 } ) ;
@@ -148,8 +168,10 @@ describe('CDK drag-drop schematic', () => {
148168 } ) ;
149169
150170 it ( 'should fall back to the @schematics/angular:component option value' , async ( ) => {
151- const tree = await runner . runSchematicAsync (
152- 'drag-drop' , baseOptions , await createTestApp ( runner , { skipTests : true } ) ) . toPromise ( ) ;
171+ const tree = await runner
172+ . runSchematicAsync (
173+ 'drag-drop' , baseOptions , await createTestApp ( runner , { skipTests : true } ) )
174+ . toPromise ( ) ;
153175
154176 expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.spec.ts' ) ;
155177 } ) ;
0 commit comments