File tree 2 files changed +34
-1
lines changed
2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -106,5 +106,22 @@ vows.describe('config').addBatch({
106
106
assert . equal ( current . settings . database , 'dbname' ) ;
107
107
}
108
108
}
109
- } ) . export ( module ) ;
109
+ } ) . addBatch ( {
110
+ 'loading a config with null values' : {
111
+ topic : function ( ) {
112
+ var configPath = path . join ( __dirname , 'database_with_null_values.json' ) ;
113
+ config . load = _configLoad ;
114
+ config . loadUrl = _configLoadUrl ;
115
+ try {
116
+ config . load ( configPath , 'dev' ) ;
117
+ } catch ( e ) {
118
+ return e ;
119
+ }
120
+ return null ;
121
+ } ,
110
122
123
+ 'should something' : function ( err ) {
124
+ assert . isNull ( err ) ;
125
+ }
126
+ }
127
+ } ) . export ( module ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "dev" : {
3
+ "driver" : null ,
4
+ "filename" : " :memory:"
5
+ },
6
+
7
+ "test" : {
8
+ "driver" : null ,
9
+ "filename" : " :memory:"
10
+ },
11
+
12
+ "prod" : {
13
+ "driver" : null ,
14
+ "filename" : " prod.db"
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments