mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
Removed rewire dependency in update check tests
refs https://github.com/TryGhost/Team/issues/728 - Rewire is usually a sign of massive module that is impossible to unit test without mocking big parts of that module. With a refactored UpdateCheckService and a brand new test coverage there is no need to use rewire and leave the "smell"
This commit is contained in:
parent
a78e034643
commit
83296c5c7e
@ -1,12 +1,11 @@
|
||||
const should = require('should');
|
||||
const rewire = require('rewire');
|
||||
const sinon = require('sinon');
|
||||
const moment = require('moment');
|
||||
const uuid = require('uuid');
|
||||
const configUtils = require('../../utils/configUtils');
|
||||
const urlUtils = require('../../utils/urlUtils');
|
||||
const packageInfo = require('../../../package.json');
|
||||
let ghostVersion = rewire('../../../core/server/lib/ghost-version');
|
||||
const ghostVersion = require('../../../core/server/lib/ghost-version');
|
||||
|
||||
const UpdateCheckService = require('../../../core/server/update-check-service');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user