diff --git a/test/unit/frontend/meta/asset-url.test.js b/test/unit/frontend/meta/asset-url.test.js index 4b0407e69f..0709cb48b9 100644 --- a/test/unit/frontend/meta/asset-url.test.js +++ b/test/unit/frontend/meta/asset-url.test.js @@ -1,12 +1,11 @@ const should = require('should'); const sinon = require('sinon'); -const rewire = require('rewire'); const imageLib = require('../../../../core/server/lib/image'); const settingsCache = require('../../../../core/shared/settings-cache'); const configUtils = require('../../../utils/configUtils'); const config = configUtils.config; -const getAssetUrl = rewire('../../../../core/frontend/meta/asset-url'); +const getAssetUrl = require('../../../../core/frontend/meta/asset-url'); describe('getAssetUrl', function () { afterEach(function () { diff --git a/test/unit/frontend/services/routing/registry.test.js b/test/unit/frontend/services/routing/registry.test.js index 8a6efa9cfb..503929039b 100644 --- a/test/unit/frontend/services/routing/registry.test.js +++ b/test/unit/frontend/services/routing/registry.test.js @@ -1,7 +1,6 @@ const should = require('should'); const sinon = require('sinon'); -const rewire = require('rewire'); -const registry = rewire('../../../../../core/frontend/services/routing/registry'); +const registry = require('../../../../../core/frontend/services/routing/registry'); describe('UNIT: services/routing/registry', function () { let getRssUrlStub; diff --git a/test/unit/server/data/exporter/index.test.js b/test/unit/server/data/exporter/index.test.js index 7c8b15b8b2..9fcf5238a4 100644 --- a/test/unit/server/data/exporter/index.test.js +++ b/test/unit/server/data/exporter/index.test.js @@ -1,10 +1,9 @@ const should = require('should'); const sinon = require('sinon'); -const rewire = require('rewire'); const Promise = require('bluebird'); const errors = require('@tryghost/errors'); const db = require('../../../../../core/server/data/db'); -const exporter = rewire('../../../../../core/server/data/exporter'); +const exporter = require('../../../../../core/server/data/exporter'); const schema = require('../../../../../core/server/data/schema'); const models = require('../../../../../core/server/models'); const schemaTables = Object.keys(schema.tables); diff --git a/test/unit/server/lib/request-external.test.js b/test/unit/server/lib/request-external.test.js index a26e44d512..04651e7a12 100644 --- a/test/unit/server/lib/request-external.test.js +++ b/test/unit/server/lib/request-external.test.js @@ -1,8 +1,7 @@ const sinon = require('sinon'); const should = require('should'); -const rewire = require('rewire'); const nock = require('nock'); -const externalRequest = rewire('../../../../core/server/lib/request-external'); +const externalRequest = require('../../../../core/server/lib/request-external'); const configUtils = require('../../../utils/configUtils'); // for sinon stubs diff --git a/test/unit/shared/settings-cache.test.js b/test/unit/shared/settings-cache.test.js index ad6c210167..fab8bb46dc 100644 --- a/test/unit/shared/settings-cache.test.js +++ b/test/unit/shared/settings-cache.test.js @@ -1,4 +1,3 @@ -const rewire = require('rewire'); const should = require('should'); const sinon = require('sinon'); const _ = require('lodash');