From 5c074fb225f68c08038e40892cd390297b770f9a Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Sun, 18 Aug 2024 09:35:54 +0200 Subject: [PATCH] [mirotalksfu] - try to add unit-tests --- tests/test-ServerAPI.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/test-ServerAPI.js b/tests/test-ServerAPI.js index 3f9f7d90..e303a74d 100644 --- a/tests/test-ServerAPI.js +++ b/tests/test-ServerAPI.js @@ -9,17 +9,14 @@ const proxyquire = require('proxyquire'); const jwt = require('jsonwebtoken'); const CryptoJS = require('crypto-js'); const ServerApi = require('../app/src/ServerApi'); -const config = require('../app/src/config'); +const config = require('../app/src/config.template.js'); describe('test-ServerAPI', () => { let serverApi; const host = 'example.com'; - const authorization = 'secret-key'; - const apiKeySecret = 'secret-key'; + const authorization = 'mirotalksfu_default_secret'; beforeEach(() => { - // Mocking config values - sinon.stub(config.api, 'keySecret').value(apiKeySecret); serverApi = new ServerApi(host, authorization); });