@@ -14,7 +14,7 @@ const fileNameNoExtension = 'filename';
14
14
const fileName = 'filename.js' ;
15
15
const templateType = Template . TemplateType . SQL_FILE_LOADER ;
16
16
17
- let internals = { } ;
17
+ const internals = { } ;
18
18
internals . migrationTable = 'migrations' ;
19
19
20
20
lab . experiment ( 'migration' , function ( ) {
@@ -52,25 +52,21 @@ function newMigrationObject () {
52
52
internals
53
53
) ;
54
54
55
- lab . test (
56
- 'should have title set without file extension' , ( ) => {
57
- Code . expect ( migration . title ) . to . equal ( fileNameNoExtension ) ;
58
- }
59
- ) ;
55
+ lab . test ( 'should have title set without file extension' , ( ) => {
56
+ Code . expect ( migration . title ) . to . equal ( fileNameNoExtension ) ;
57
+ } ) ;
60
58
61
59
lab . test ( 'should have date set' , ( ) => {
62
60
migration . date . setMilliseconds ( 0 ) ;
63
61
date . setMilliseconds ( 0 ) ;
64
62
Code . expect ( migration . date . getTime ( ) ) . to . equal ( date . getTime ( ) ) ;
65
63
} ) ;
66
64
67
- lab . test (
68
- 'should have name set without file extension' , ( ) => {
69
- Code . expect ( migration . name ) . to . equal (
70
- dateString + '-' + fileNameNoExtension
71
- ) ;
72
- }
73
- ) ;
65
+ lab . test ( 'should have name set without file extension' , ( ) => {
66
+ Code . expect ( migration . name ) . to . equal (
67
+ dateString + '-' + fileNameNoExtension
68
+ ) ;
69
+ } ) ;
74
70
75
71
lab . test ( 'should have path set' , ( ) => {
76
72
Code . expect ( migration . path ) . to . equal (
@@ -150,12 +146,10 @@ function getTemplate () {
150
146
function ( ) {
151
147
const migration = new Template ( fileName , dirName , date , internals ) ;
152
148
153
- lab . test (
154
- 'should return default javascript template' , ( ) => {
155
- const actual = migration . getTemplate ( ) ;
156
- Code . expect ( actual ) . to . equal ( migration . defaultJsTemplate ( ) ) ;
157
- }
158
- ) ;
149
+ lab . test ( 'should return default javascript template' , ( ) => {
150
+ const actual = migration . getTemplate ( ) ;
151
+ Code . expect ( actual ) . to . equal ( migration . defaultJsTemplate ( ) ) ;
152
+ } ) ;
159
153
}
160
154
) ;
161
155
@@ -169,12 +163,10 @@ function getTemplate () {
169
163
internals
170
164
) ;
171
165
172
- lab . test (
173
- 'should return sql file loader template' , ( ) => {
174
- const actual = migration . getTemplate ( ) ;
175
- Code . expect ( actual ) . to . equal ( migration . sqlFileLoaderTemplate ( ) ) ;
176
- }
177
- ) ;
166
+ lab . test ( 'should return sql file loader template' , ( ) => {
167
+ const actual = migration . getTemplate ( ) ;
168
+ Code . expect ( actual ) . to . equal ( migration . sqlFileLoaderTemplate ( ) ) ;
169
+ } ) ;
178
170
} ) ;
179
171
180
172
lab . experiment ( 'as default sql' , function ( ) {
@@ -186,12 +178,10 @@ function getTemplate () {
186
178
internals
187
179
) ;
188
180
189
- lab . test (
190
- 'should return default sql template' , ( ) => {
191
- const actual = migration . getTemplate ( ) ;
192
- Code . expect ( actual ) . to . equal ( migration . defaultSqlTemplate ( ) ) ;
193
- }
194
- ) ;
181
+ lab . test ( 'should return default sql template' , ( ) => {
182
+ const actual = migration . getTemplate ( ) ;
183
+ Code . expect ( actual ) . to . equal ( migration . defaultSqlTemplate ( ) ) ;
184
+ } ) ;
195
185
} ) ;
196
186
197
187
lab . experiment ( 'as default coffee' , function ( ) {
@@ -203,12 +193,10 @@ function getTemplate () {
203
193
internals
204
194
) ;
205
195
206
- lab . test (
207
- 'should return default coffee template' , ( ) => {
208
- const actual = migration . getTemplate ( ) ;
209
- Code . expect ( actual ) . to . equal ( migration . defaultCoffeeTemplate ( ) ) ;
210
- }
211
- ) ;
196
+ lab . test ( 'should return default coffee template' , ( ) => {
197
+ const actual = migration . getTemplate ( ) ;
198
+ Code . expect ( actual ) . to . equal ( migration . defaultCoffeeTemplate ( ) ) ;
199
+ } ) ;
212
200
} ) ;
213
201
214
202
lab . experiment ( 'as coffee sql loader' , function ( ) {
@@ -220,12 +208,10 @@ function getTemplate () {
220
208
internals
221
209
) ;
222
210
223
- lab . test (
224
- 'should return default coffee template' , ( ) => {
225
- const actual = migration . getTemplate ( ) ;
226
- Code . expect ( actual ) . to . equal ( migration . coffeeSqlFileLoaderTemplate ( ) ) ;
227
- }
228
- ) ;
211
+ lab . test ( 'should return default coffee template' , ( ) => {
212
+ const actual = migration . getTemplate ( ) ;
213
+ Code . expect ( actual ) . to . equal ( migration . coffeeSqlFileLoaderTemplate ( ) ) ;
214
+ } ) ;
229
215
} ) ;
230
216
231
217
lab . experiment ( 'as default javascript' , function ( ) {
@@ -237,12 +223,10 @@ function getTemplate () {
237
223
internals
238
224
) ;
239
225
240
- lab . test (
241
- 'should return default sql template' , ( ) => {
242
- const actual = migration . getTemplate ( ) ;
243
- Code . expect ( actual ) . to . equal ( migration . defaultJsTemplate ( ) ) ;
244
- }
245
- ) ;
226
+ lab . test ( 'should return default sql template' , ( ) => {
227
+ const actual = migration . getTemplate ( ) ;
228
+ Code . expect ( actual ) . to . equal ( migration . defaultJsTemplate ( ) ) ;
229
+ } ) ;
246
230
} ) ;
247
231
} ) ;
248
232
}
0 commit comments