Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into replace-babel-wit…
Browse files Browse the repository at this point in the history
…h-browserify

Conflicts:
	dist/debug.js
	test/.babelrc
	test/debug_spec.js
  • Loading branch information
AccaliaDeElementia committed Dec 20, 2016
2 parents 3e1a15d + 6e934e9 commit 23af483
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/debug_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (typeof module !== 'undefined') {
var expect = chai.expect;

var debug = require('../src/index');
var sinon = require('sinon');
var = require('sinon');
var sinonChai = require("sinon-chai");
chai.use(sinonChai);
}
Expand Down Expand Up @@ -35,5 +35,22 @@ describe('debug', function () {
expect(log.log).to.have.been.calledOnce;
});
});

describe('custom functions', () => {
let log;

beforeEach(() => {
debug.enable('test');
log = debug('test');
});

context('with log function', () => {
it('uses it', () => {
log.log = sinon.spy();
log('using custom log function');

chai.assert.calledOnce(log.log);
});
});
});
});

0 comments on commit 23af483

Please sign in to comment.