@@ -44,8 +44,11 @@ describe('CDK drag-drop schematic', () => {
44
44
45
45
describe ( 'style option' , ( ) => {
46
46
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 ( ) ;
49
52
50
53
expect ( tree . files ) . toContain ( '/projects/material/src/app/foo/foo.component.scss' ) ;
51
54
} ) ;
@@ -68,21 +71,30 @@ describe('CDK drag-drop schematic', () => {
68
71
} ) ;
69
72
70
73
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 ( ) ;
73
79
74
80
// In this case we expect the schematic to generate a plain "css" file because
75
81
// the component schematics are using CSS style templates which are not compatible
76
82
// 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' ) ;
81
91
} ) ;
82
92
83
93
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 ( ) ;
86
98
87
99
expect ( tree . files ) . toContain ( '/projects/material/src/app/foo/foo.component.less' ) ;
88
100
} ) ;
@@ -91,15 +103,19 @@ describe('CDK drag-drop schematic', () => {
91
103
describe ( 'inlineStyle option' , ( ) => {
92
104
it ( 'should respect the option value' , async ( ) => {
93
105
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 ( ) ;
96
109
97
110
expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.css' ) ;
98
111
} ) ;
99
112
100
113
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 ( ) ;
103
119
104
120
expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.css' ) ;
105
121
} ) ;
@@ -108,8 +124,9 @@ describe('CDK drag-drop schematic', () => {
108
124
describe ( 'inlineTemplate option' , ( ) => {
109
125
it ( 'should respect the option value' , async ( ) => {
110
126
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 ( ) ;
113
130
114
131
expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.html' ) ;
115
132
} ) ;
@@ -124,8 +141,11 @@ describe('CDK drag-drop schematic', () => {
124
141
125
142
describe ( 'skipTests option' , ( ) => {
126
143
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 ( ) ;
129
149
130
150
expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.spec.ts' ) ;
131
151
} ) ;
@@ -148,8 +168,10 @@ describe('CDK drag-drop schematic', () => {
148
168
} ) ;
149
169
150
170
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 ( ) ;
153
175
154
176
expect ( tree . files ) . not . toContain ( '/projects/material/src/app/foo/foo.component.spec.ts' ) ;
155
177
} ) ;
0 commit comments