-
Notifications
You must be signed in to change notification settings - Fork 945
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Combined backend and frontend tests
- Loading branch information
1 parent
9011c5a
commit 92e0e88
Showing
6 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* global describe, it */ | ||
|
||
if (typeof module !== 'undefined' && module.exports) { | ||
const chai = require('chai'); | ||
const expect = chai.expect; | ||
|
||
const debug = require('../src/index'); | ||
const sinon = require('sinon'); | ||
var sinonChai = require("sinon-chai"); | ||
chai.use(sinonChai); | ||
} | ||
|
||
const dummyConsole = { | ||
log: function() { | ||
//dummy function | ||
} | ||
}; | ||
|
||
debug.log = dummyConsole; | ||
|
||
|
||
describe('debug', function () { | ||
const log = debug('test'); | ||
log.log = sinon.stub(); | ||
it('passes a basic sanity check', function () { | ||
expect(log('hello world')).to.not.throw; | ||
}); | ||
|
||
it('Should output to the log function', function () { | ||
sinon.spy(dummyConsole, 'log'); | ||
log('Hello world'); | ||
//expect(dummyConsole.log).to.have.been.called; | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.