@@ -141,12 +141,15 @@ describe('package.json content', () => {
141
141
142
142
it ( 'should have dependencies' , ( ) => {
143
143
assert ( pkg . dependencies [ 'egg-mongoose' ] ) ;
144
+ assert ( pkg . dependencies [ 'egg-tx' ] ) ;
144
145
} )
145
146
146
147
it ( 'should have config' , ( ) => {
147
148
assert . fileContent ( [
148
149
[ 'config/config.default.js' , / c o n f i g .m o n g o o s e .* = / ] ,
149
- [ 'config/plugin.js' , / m o n g o o s e .* : / ]
150
+ [ 'config/plugin.js' , / m o n g o o s e .* : / ] ,
151
+ [ 'config/config.default.js' , / c o n f i g .t x .* = \s .* \s * .* \s * d b T y p e : \s ' m o n g o ' / ] ,
152
+ [ 'config/plugin.js' , / t x .* : / ]
150
153
] )
151
154
} )
152
155
} )
@@ -168,12 +171,15 @@ describe('package.json content', () => {
168
171
it ( 'should have dependencies' , ( ) => {
169
172
assert ( pkg . dependencies [ 'egg-sequelize' ] ) ;
170
173
assert ( pkg . dependencies [ 'mysql2' ] ) ;
174
+ assert ( pkg . dependencies [ 'egg-tx' ] ) ;
171
175
} )
172
176
173
177
it ( 'should have config' , ( ) => {
174
178
assert . fileContent ( [
175
179
[ 'config/config.default.js' , / c o n f i g .s e q u e l i z e .* = / ] ,
176
- [ 'config/plugin.js' , / s e q u e l i z e .* : / ]
180
+ [ 'config/plugin.js' , / s e q u e l i z e .* : / ] ,
181
+ [ 'config/config.default.js' , / c o n f i g .t x .* = \s .* \s * .* \s * d b T y p e : \s ' m y s q l ' / ] ,
182
+ [ 'config/plugin.js' , / t x .* : / ]
177
183
] )
178
184
} )
179
185
} )
@@ -195,14 +201,17 @@ describe('package.json content', () => {
195
201
it ( 'should have not dependencies' , ( ) => {
196
202
assert ( ! pkg . dependencies [ 'egg-mongoose' ] ) ;
197
203
assert ( ! pkg . dependencies [ 'egg-sequelize' ] ) ;
204
+ assert ( ! pkg . dependencies [ 'egg-tx' ] ) ;
198
205
} )
199
206
200
207
it ( 'should have not config' , ( ) => {
201
208
assert . noFileContent ( [
202
209
[ 'config/config.default.js' , / c o n f i g .m o n g o o s e .* = / ] ,
203
210
[ 'config/plugin.js' , / m o n g o o s e .* : / ] ,
204
211
[ 'config/config.default.js' , / c o n f i g .s e q u e l i z e .* = / ] ,
205
- [ 'config/plugin.js' , / s e q u e l i z e .* : / ]
212
+ [ 'config/plugin.js' , / s e q u e l i z e .* : / ] ,
213
+ [ 'config/config.default.js' , / c o n f i g .t x .* = / ] ,
214
+ [ 'config/plugin.js' , / t x .* : / ]
206
215
] )
207
216
} )
208
217
} )
0 commit comments