File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,14 @@ describe('Cloud Code', () => {
103
103
expect ( currentConfig . silent ) . toBeFalse ( ) ;
104
104
} ) ;
105
105
106
+ it ( 'can get curent version' , ( ) => {
107
+ const version = require ( '../package.json' ) . version ;
108
+ const currentConfig = Config . get ( 'test' ) ;
109
+ expect ( Parse . Server . version ) . toBeDefined ( ) ;
110
+ expect ( currentConfig . version ) . toBeDefined ( ) ;
111
+ expect ( Parse . Server . version ) . toEqual ( version ) ;
112
+ } ) ;
113
+
106
114
it ( 'show warning on duplicate cloud functions' , done => {
107
115
const logger = require ( '../lib/logger' ) . logger ;
108
116
spyOn ( logger , 'warn' ) . and . callFake ( ( ) => { } ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import net from 'net';
7
7
import AppCache from './cache' ;
8
8
import DatabaseController from './Controllers/DatabaseController' ;
9
9
import { logLevels as validLogLevels } from './Controllers/LoggerController' ;
10
+ import { version } from '../package.json' ;
10
11
import {
11
12
AccountLockoutOptions ,
12
13
DatabaseOptions ,
@@ -50,6 +51,7 @@ export class Config {
50
51
config . generateEmailVerifyTokenExpiresAt = config . generateEmailVerifyTokenExpiresAt . bind (
51
52
config
52
53
) ;
54
+ config . version = version ;
53
55
return config ;
54
56
}
55
57
You can’t perform that action at this time.
0 commit comments