|
1 | 1 | const assert = require('assert');
|
2 | 2 | const sinon = require('sinon');
|
3 | 3 | const RollingChatCache = require('../../../lib/services/dgg-rolling-chat-cache');
|
4 |
| -const config = require('../../../lib/configuration/prod.config.json'); |
5 |
| -const logger = require('../../../lib/services/logger'); |
6 | 4 | const messageMatchingService = require('../../../lib/services/message-matching');
|
| 5 | +const Logger = require('bunyan'); |
7 | 6 |
|
8 | 7 | describe('Chat Cache Test suite', () => {
|
9 | 8 | describe('Chat Cache Viewer Map Tests', () => {
|
10 | 9 | beforeEach(() => {
|
11 | 10 | this.mockServices = {
|
12 |
| - logger: logger(config.logger), |
| 11 | + logger: sinon.createStubInstance(Logger), |
13 | 12 | messageMatching: messageMatchingService,
|
14 | 13 | };
|
15 | 14 | });
|
@@ -101,7 +100,7 @@ describe('Chat Cache Test suite', () => {
|
101 | 100 | describe('Chat Cache Tombstoning Tests', () => {
|
102 | 101 | beforeEach(function () {
|
103 | 102 | this.mockServices = {
|
104 |
| - logger: logger(config.logger), |
| 103 | + logger: sinon.createStubInstance(Logger), |
105 | 104 | messageMatching: messageMatchingService,
|
106 | 105 | };
|
107 | 106 | this.clock = sinon.useFakeTimers();
|
@@ -160,7 +159,7 @@ describe('Chat Cache Test suite', () => {
|
160 | 159 | describe('Chat Cache Rate Limit Tests', () => {
|
161 | 160 | beforeEach(function () {
|
162 | 161 | this.mockServices = {
|
163 |
| - logger: logger(config.logger), |
| 162 | + logger: sinon.createStubInstance(Logger), |
164 | 163 | messageMatching: messageMatchingService,
|
165 | 164 | };
|
166 | 165 | this.clock = sinon.useFakeTimers();
|
@@ -204,7 +203,7 @@ describe('Chat Cache Test suite', () => {
|
204 | 203 | describe('Chat Cache Running List', () => {
|
205 | 204 | beforeEach(function () {
|
206 | 205 | this.mockServices = {
|
207 |
| - logger: logger(config.logger), |
| 206 | + logger: sinon.createStubInstance(Logger), |
208 | 207 | messageMatching: messageMatchingService,
|
209 | 208 | };
|
210 | 209 | this.clock = sinon.useFakeTimers();
|
|
0 commit comments