Work in progress: switch to Phantomas v2

This commit is contained in:
Gaël Métais
2019-03-14 03:27:37 +01:00
parent 5e82eea9f1
commit 517206364a
14 changed files with 248 additions and 319 deletions
+2 -3
View File
@@ -26,7 +26,6 @@ describe('phantomasWrapper', function() {
data.should.have.a.property('url').that.equals(url);
data.should.have.a.property('metrics').that.is.an('object').not.empty;
data.should.have.a.property('offenders').that.is.an('object').not.empty;
data.offenders.should.have.a.property('javascriptExecutionTree').that.is.a('array').not.empty;
done();
}).fail(function(err) {
@@ -34,7 +33,7 @@ describe('phantomasWrapper', function() {
});
});
it('should fail with error 254', function(done) {
it('should fail when page cannot be fetched', function(done) {
var url = 'http://localhost:8389/not-existing.html';
this.timeout(15000);
@@ -52,8 +51,8 @@ describe('phantomasWrapper', function() {
}).fail(function(err) {
try {
console.log(err);
should.exist(err);
err.should.equal(254);
done();
} catch(error) {