|
@@ -1,6 +1,11 @@
|
|
|
-var should = require('chai').should();
|
|
|
+var chai = require('chai');
|
|
|
+var sinon = require('sinon');
|
|
|
+var sinonChai = require('sinon-chai');
|
|
|
+var should = chai.should();
|
|
|
var YellowLabTools = require('../../lib/yellowlabtools.js');
|
|
|
|
|
|
+chai.use(sinonChai);
|
|
|
+
|
|
|
|
|
|
describe('yellowlabtools', function() {
|
|
|
|
|
@@ -28,6 +33,9 @@ describe('yellowlabtools', function() {
|
|
|
it('succeeds on simple-page.html', function(done) {
|
|
|
this.timeout(15000);
|
|
|
|
|
|
+ // Check if console.log is called
|
|
|
+ sinon.spy(console, 'log')
|
|
|
+
|
|
|
var url = 'http://localhost:8388/simple-page.html';
|
|
|
|
|
|
var ylt = new YellowLabTools(url)
|
|
@@ -67,6 +75,8 @@ describe('yellowlabtools', function() {
|
|
|
"offenders": ["body > h1[1]"]
|
|
|
});
|
|
|
|
|
|
+ console.log.should.not.have.been.called;
|
|
|
+
|
|
|
done();
|
|
|
}).fail(function(err) {
|
|
|
done(err);
|