File tree 3 files changed +17
-26
lines changed
3 files changed +17
-26
lines changed Original file line number Diff line number Diff line change
1
+ const staticMethods = [
2
+ 'and' ,
3
+ 'cast' ,
4
+ 'col' ,
5
+ 'fn' ,
6
+ 'json' ,
7
+ 'literal' ,
8
+ 'or' ,
9
+ 'useCLS' ,
10
+ 'where'
11
+ ]
12
+
13
+ module . exports = staticMethods
Original file line number Diff line number Diff line change 1
1
const sinon = require ( 'sinon' )
2
2
const hooks = require ( './constants/hooks' )
3
-
4
- const STATICS_METHODS = [
5
- 'and' ,
6
- 'cast' ,
7
- 'col' ,
8
- 'fn' ,
9
- 'json' ,
10
- 'literal' ,
11
- 'or' ,
12
- 'useCLS' ,
13
- 'where'
14
- ]
3
+ const staticMethods = require ( './constants/staticMethods' )
15
4
16
5
const sequelize = {
17
6
define : ( modelName , modelDefn , metaData = { } ) => {
@@ -56,7 +45,7 @@ const sequelize = {
56
45
}
57
46
}
58
47
59
- STATICS_METHODS . forEach ( method => {
48
+ staticMethods . forEach ( method => {
60
49
sequelize [ method ] = sinon . stub ( )
61
50
} )
62
51
Original file line number Diff line number Diff line change 1
1
const { expect } = require ( 'chai' )
2
2
3
3
const sequelize = require ( '../../src/sequelize' )
4
-
5
- const STATIC_METHODS = [
6
- 'and' ,
7
- 'cast' ,
8
- 'col' ,
9
- 'fn' ,
10
- 'json' ,
11
- 'literal' ,
12
- 'or' ,
13
- 'useCLS' ,
14
- 'where'
15
- ]
4
+ const staticMethods = require ( '../../src/constants/staticMethods' )
16
5
17
6
describe ( 'src/sequelize' , ( ) => {
18
7
it ( 'has define' , ( ) => {
19
8
expect ( sequelize ) . to . have . property ( 'define' )
20
9
expect ( sequelize . define ) . to . be . a ( 'function' )
21
10
} )
22
11
23
- STATIC_METHODS . forEach ( method => {
12
+ staticMethods . forEach ( method => {
24
13
it ( `has static method ${ method } ` , ( ) => {
25
14
expect ( sequelize [ method ] ) . to . be . a ( 'function' )
26
15
} )
You can’t perform that action at this time.
0 commit comments