Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
reflect deprecated method name in sinon (sinonjs/sinon#1630)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxholman committed Jan 7, 2019
1 parent fd322d6 commit 99e959b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ describe('Debug Module', () => {
});

it('is called with correct params (basic)', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = true;

debug('testing');
sinon.assert.calledWith(mockDebugFunction, 'testing');
});

it('calls functions correctly (single function)', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = true;

debug(() => 'testing');
Expand All @@ -52,7 +52,7 @@ describe('Debug Module', () => {
});

it('calls functions correctly (multiple arguments)', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = true;

debug(1, 2, 3, 4, () => 5);
Expand All @@ -62,7 +62,7 @@ describe('Debug Module', () => {


it('passes correct arguments through (multiple data types)', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = true;

debug(() => 'testing', {}, []);
Expand All @@ -72,15 +72,15 @@ describe('Debug Module', () => {
});

it('doesn\'t do anything at all when debug is turned off', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = false;

debug(() => 'testing', {}, []);
sinon.assert.notCalled(mockDebugFunction);
});

it('is called twice correctly', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = true;

debug(() => 'testing', {}, []);
Expand All @@ -89,7 +89,7 @@ describe('Debug Module', () => {
});

it('returned undefined', () => {
mockDebugFunction.reset();
mockDebugFunction.resetHistory();
mockDebugFunction.enabled = true;

const result = debug(() => 'testing', {}, []);
Expand Down

0 comments on commit 99e959b

Please sign in to comment.