From 483af01c99c21c79a77aa18454c846c09f0cde98 Mon Sep 17 00:00:00 2001 From: Braun Patrik Date: Mon, 20 Mar 2017 11:37:20 +0100 Subject: [PATCH] fixing tests --- karma.conf.js | 7 ++++--- test/backend/unit/middlewares/uesr/AuthenticationMWs.ts | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 025f1170..685e2d4a 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -28,14 +28,15 @@ module.exports = function(config) { files: [ - // System.js for module loading - 'node_modules/systemjs/dist/system-polyfills.js', - 'node_modules/systemjs/dist/system.src.js', // Polyfills 'node_modules/core-js/client/shim.js', 'node_modules/reflect-metadata/Reflect.js', + // System.js for module loading + 'node_modules/systemjs/dist/system.js', + + // zone.js 'node_modules/zone.js/dist/zone.js', 'node_modules/zone.js/dist/long-stack-trace-zone.js', diff --git a/test/backend/unit/middlewares/uesr/AuthenticationMWs.ts b/test/backend/unit/middlewares/uesr/AuthenticationMWs.ts index cc505eac..ab510f08 100644 --- a/test/backend/unit/middlewares/uesr/AuthenticationMWs.ts +++ b/test/backend/unit/middlewares/uesr/AuthenticationMWs.ts @@ -4,6 +4,7 @@ import {Error, ErrorCodes} from "../../../../../common/entities/Error"; import {UserRoles} from "../../../../../common/entities/UserDTO"; import {ObjectManagerRepository} from "../../../../../backend/model/ObjectManagerRepository"; import {UserManager} from "../../../../../backend/model/memory/UserManager"; +import {Config} from "../../../../../backend/config/Config"; describe('Authentication middleware', () => { @@ -31,6 +32,7 @@ describe('Authentication middleware', () => { let req:any = { session: {} }; + Config.Client.authenticationRequired = true; let res:any = {}; let next:any = (err:Error) => { expect(err).not.to.be.undefined;