diff --git a/package.json b/package.json index 43a723b3..21d7f1fe 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "bin": "./backend/index.js", "scripts": { "install": "tsc && ng build -prod", - "build-release": "gulp", + "build-release": "gulp build-release", "pretest": "tsc", "test": "ng test --single-run && mocha --recursive test/backend/unit", "start": "node ./backend/index", diff --git a/test/backend/unit/middlewares/user/AuthenticationMWs.ts b/test/backend/unit/middlewares/user/AuthenticationMWs.ts index e245f4cc..6c19cd62 100644 --- a/test/backend/unit/middlewares/user/AuthenticationMWs.ts +++ b/test/backend/unit/middlewares/user/AuthenticationMWs.ts @@ -5,6 +5,7 @@ import {UserDTO, UserRoles} from "../../../../../common/entities/UserDTO"; import {ObjectManagerRepository} from "../../../../../backend/model/ObjectManagerRepository"; import {UserManager} from "../../../../../backend/model/memory/UserManager"; import {Config} from "../../../../../common/config/private/Config"; +import {IUserManager} from "../../../../../backend/model/interfaces/IUserManager"; describe('Authentication middleware', () => { @@ -219,9 +220,9 @@ describe('Authentication middleware', () => { expect(req.session.user).to.be.eql("test user"); done(); }; - ObjectManagerRepository.getInstance().UserManager = { + ObjectManagerRepository.getInstance().UserManager = { findOne: (filter) => { - return Promise.resolve("test user"); + return Promise.resolve("test user"); } }; AuthenticationMWs.login(req, null, next);