@@ -20,6 +20,7 @@ describe('SubApp Factory', () => {
20
20
const files : string [ ] = tree . files ;
21
21
expect ( files . sort ( ) ) . toEqual ( [
22
22
'/nest-cli.json' ,
23
+ '/apps/jest-e2e.json' ,
23
24
'/apps/nestjs-schematics/tsconfig.app.json' ,
24
25
'/apps/project/tsconfig.app.json' ,
25
26
'/apps/project/src/main.ts' ,
@@ -30,6 +31,13 @@ describe('SubApp Factory', () => {
30
31
'/apps/project/test/app.e2e-spec.ts' ,
31
32
'/apps/project/test/jest-e2e.json' ,
32
33
] . sort ( ) ) ;
34
+
35
+ expect ( JSON . parse ( tree . readContent ( '/apps/jest-e2e.json' ) ) ) . toMatchObject ( {
36
+ projects : [
37
+ 'apps/nestjs-schematics/test/jest-e2e.json' ,
38
+ 'apps/project/test/jest-e2e.json' ,
39
+ ]
40
+ } ) ;
33
41
} ) ;
34
42
it ( 'should manage name to normalize' , async ( ) => {
35
43
const options : SubAppOptions = {
@@ -41,6 +49,7 @@ describe('SubApp Factory', () => {
41
49
const files : string [ ] = tree . files ;
42
50
expect ( files . sort ( ) ) . toEqual ( [
43
51
'/nest-cli.json' ,
52
+ '/apps/jest-e2e.json' ,
44
53
'/apps/nestjs-schematics/tsconfig.app.json' ,
45
54
'/apps/awesome-project/tsconfig.app.json' ,
46
55
'/apps/awesome-project/src/main.ts' ,
@@ -51,6 +60,13 @@ describe('SubApp Factory', () => {
51
60
'/apps/awesome-project/test/app.e2e-spec.ts' ,
52
61
'/apps/awesome-project/test/jest-e2e.json' ,
53
62
] . sort ( ) ) ;
63
+
64
+ expect ( JSON . parse ( tree . readContent ( '/apps/jest-e2e.json' ) ) ) . toMatchObject ( {
65
+ projects : [
66
+ 'apps/nestjs-schematics/test/jest-e2e.json' ,
67
+ 'apps/awesome-project/test/jest-e2e.json' ,
68
+ ]
69
+ } ) ;
54
70
} ) ;
55
71
it ( "should keep underscores in sub-app's path and file name" , async ( ) => {
56
72
const options : SubAppOptions = {
@@ -62,6 +78,7 @@ describe('SubApp Factory', () => {
62
78
const files : string [ ] = tree . files ;
63
79
expect ( files . sort ( ) ) . toEqual ( [
64
80
'/nest-cli.json' ,
81
+ '/apps/jest-e2e.json' ,
65
82
'/apps/nestjs-schematics/tsconfig.app.json' ,
66
83
'/apps/_project/tsconfig.app.json' ,
67
84
'/apps/_project/src/main.ts' ,
@@ -72,6 +89,13 @@ describe('SubApp Factory', () => {
72
89
'/apps/_project/test/app.e2e-spec.ts' ,
73
90
'/apps/_project/test/jest-e2e.json' ,
74
91
] . sort ( ) ) ;
92
+
93
+ expect ( JSON . parse ( tree . readContent ( '/apps/jest-e2e.json' ) ) ) . toMatchObject ( {
94
+ projects : [
95
+ 'apps/nestjs-schematics/test/jest-e2e.json' ,
96
+ 'apps/_project/test/jest-e2e.json' ,
97
+ ]
98
+ } ) ;
75
99
} ) ;
76
100
it ( 'should manage javascript files' , async ( ) => {
77
101
const options : SubAppOptions = {
@@ -84,6 +108,7 @@ describe('SubApp Factory', () => {
84
108
const files : string [ ] = tree . files ;
85
109
expect ( files . sort ( ) ) . toEqual ( [
86
110
'/nest-cli.json' ,
111
+ '/apps/jest-e2e.json' ,
87
112
'/apps/nestjs-schematics/.babelrc' ,
88
113
'/apps/nestjs-schematics/index.js' ,
89
114
'/apps/nestjs-schematics/jsconfig.json' ,
@@ -98,6 +123,13 @@ describe('SubApp Factory', () => {
98
123
'/apps/project/test/app.e2e-spec.js' ,
99
124
'/apps/project/test/jest-e2e.json' ,
100
125
] . sort ( ) ) ;
126
+
127
+ expect ( JSON . parse ( tree . readContent ( '/apps/jest-e2e.json' ) ) ) . toMatchObject ( {
128
+ projects : [
129
+ 'apps/nestjs-schematics/test/jest-e2e.json' ,
130
+ 'apps/project/test/jest-e2e.json' ,
131
+ ]
132
+ } ) ;
101
133
} ) ;
102
134
it ( 'should generate spec files with custom suffix' , async ( ) => {
103
135
const options : SubAppOptions = {
@@ -110,6 +142,7 @@ describe('SubApp Factory', () => {
110
142
const files : string [ ] = tree . files ;
111
143
expect ( files . sort ( ) ) . toEqual ( [
112
144
'/nest-cli.json' ,
145
+ '/apps/jest-e2e.json' ,
113
146
'/apps/nestjs-schematics/tsconfig.app.json' ,
114
147
'/apps/project/tsconfig.app.json' ,
115
148
'/apps/project/src/main.ts' ,
@@ -120,5 +153,12 @@ describe('SubApp Factory', () => {
120
153
'/apps/project/test/jest-e2e.json' ,
121
154
'/apps/project/test/app.e2e-test.ts' ,
122
155
] . sort ( ) ) ;
156
+
157
+ expect ( JSON . parse ( tree . readContent ( '/apps/jest-e2e.json' ) ) ) . toMatchObject ( {
158
+ projects : [
159
+ 'apps/nestjs-schematics/test/jest-e2e.json' ,
160
+ 'apps/project/test/jest-e2e.json' ,
161
+ ]
162
+ } ) ;
123
163
} ) ;
124
164
} ) ;
0 commit comments