feat: Add property Parse.Server.version to determine current version of Parse Server in Cloud Code (#8670)

This commit is contained in:
Daniel
2023-07-06 06:11:35 +10:00
committed by GitHub
parent a742656a90
commit a9d376b61f
2 changed files with 10 additions and 0 deletions

View File

@@ -103,6 +103,14 @@ describe('Cloud Code', () => {
expect(currentConfig.silent).toBeFalse();
});
it('can get curent version', () => {
const version = require('../package.json').version;
const currentConfig = Config.get('test');
expect(Parse.Server.version).toBeDefined();
expect(currentConfig.version).toBeDefined();
expect(Parse.Server.version).toEqual(version);
});
it('show warning on duplicate cloud functions', done => {
const logger = require('../lib/logger').logger;
spyOn(logger, 'warn').and.callFake(() => {});