From 55204bf7259faeb940f7437791dea2cdd2afaaf0 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 16 Feb 2022 19:04:57 +0100 Subject: [PATCH] Fixed admin views path mocking override in tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - for some reason, this test seems to be failing now we've pulled it out of the general CI - it makes sense when the repo is clean, because the html files don't exist, but I don't understand how they were working before... 🤔 - anyway, we should be overriding the path to the test fixtures admin view files here - this fixes the unit tests --- test/unit/server/web/admin/controller.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/server/web/admin/controller.test.js b/test/unit/server/web/admin/controller.test.js index 34852cc253..bd3c757abc 100644 --- a/test/unit/server/web/admin/controller.test.js +++ b/test/unit/server/web/admin/controller.test.js @@ -1,5 +1,6 @@ require('should'); const sinon = require('sinon'); +const path = require('path'); const configUtils = require('../../../../utils/configUtils'); const controller = require('../../../../../core/server/web/admin/controller'); @@ -14,6 +15,7 @@ describe('Admin App', function () { }; configUtils.restore(); + configUtils.set('paths:adminViews', path.resolve('test/utils/fixtures/admin-views')); }); afterEach(function () {