|
@@ -88,7 +88,7 @@ describe('createDebugger', function () {
|
|
|
process.env.DEBUG = 'other';
|
|
process.env.DEBUG = 'other';
|
|
|
const debug = createDebugger('test');
|
|
const debug = createDebugger('test');
|
|
|
debug('hello world');
|
|
debug('hello world');
|
|
|
- expect(consoleLogSpy.called).to.be.false;
|
|
|
|
|
|
|
+ expect(consoleLogSpy.isCalled).to.be.false;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should output formatted string messages using %s, %v, %l', function () {
|
|
it('should output formatted string messages using %s, %v, %l', function () {
|
|
@@ -297,14 +297,14 @@ describe('createDebugger', function () {
|
|
|
process.env.DEBUG = 'app:service';
|
|
process.env.DEBUG = 'app:service';
|
|
|
const debug = createDebugger('app:service');
|
|
const debug = createDebugger('app:service');
|
|
|
debug('message');
|
|
debug('message');
|
|
|
- expect(consoleLogSpy.called).to.be.true;
|
|
|
|
|
|
|
+ expect(consoleLogSpy.isCalled).to.be.true;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should disable debugger if no match in DEBUG', function () {
|
|
it('should disable debugger if no match in DEBUG', function () {
|
|
|
process.env.DEBUG = 'app:other';
|
|
process.env.DEBUG = 'app:other';
|
|
|
const debug = createDebugger('app:service');
|
|
const debug = createDebugger('app:service');
|
|
|
debug('message');
|
|
debug('message');
|
|
|
- expect(consoleLogSpy.called).to.be.false;
|
|
|
|
|
|
|
+ expect(consoleLogSpy.isCalled).to.be.false;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should enable debugger based on wildcard match in DEBUG (*)', function () {
|
|
it('should enable debugger based on wildcard match in DEBUG (*)', function () {
|
|
@@ -575,7 +575,7 @@ describe('createDebugger', function () {
|
|
|
process.env.DEBUG = 'other';
|
|
process.env.DEBUG = 'other';
|
|
|
const debug = createDebugger('app');
|
|
const debug = createDebugger('app');
|
|
|
debug.inspect({a: 1});
|
|
debug.inspect({a: 1});
|
|
|
- expect(consoleLogSpy.called).to.be.false;
|
|
|
|
|
|
|
+ expect(consoleLogSpy.isCalled).to.be.false;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('should output a colorized dump of a single argument', function () {
|
|
it('should output a colorized dump of a single argument', function () {
|