mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
20 lines
524 B
JavaScript
20 lines
524 B
JavaScript
/* eslint-disable no-undef */
|
|
|
|
const PKG_VERSION = require('../package.json').version;
|
|
const { mockDbCollection } = require('./helper');
|
|
|
|
const util = require('../util/db');
|
|
const update = jest.spyOn(util, 'update');
|
|
|
|
const end = require('../scripts/end');
|
|
|
|
test('Should update GlobalConfig record with name "version" to package version', async () => {
|
|
mockDbCollection();
|
|
await end();
|
|
expect(update).toBeCalledWith(
|
|
'GlobalConfig',
|
|
{ name: 'version' },
|
|
{ value: PKG_VERSION }
|
|
);
|
|
});
|