diff --git a/package.json b/package.json index d89d7fd..dabe4e7 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "nyc": "^15.1.0", "q": "^1.5.1", "rimraf": "^5.0.5", - "sinon": "^17.0.1", + "sinon": "^12.0.0", "source-map-support": "^0.5.21", "ts-node": "^10.9.2", "typescript": "^5.4.3" diff --git a/src/Logger.spec.ts b/src/Logger.spec.ts index 8aff42e..e34a7ee 100644 --- a/src/Logger.spec.ts +++ b/src/Logger.spec.ts @@ -1,5 +1,6 @@ import { expect } from 'chai'; import { Logger, LogLevel, noop } from './Logger'; +import chalk from 'chalk'; import { createSandbox } from 'sinon'; const sinon = createSandbox(); @@ -9,6 +10,8 @@ describe('Logger', () => { beforeEach(() => { logger = new Logger(LogLevel.trace); sinon.restore(); + //disable chalk colors for testing + sinon.stub(chalk, 'grey').callsFake((arg) => arg as any); }); it('noop does nothing', () => {