|
@@ -8,7 +8,7 @@ describe('phantomasWrapper', function() {
|
|
});
|
|
});
|
|
|
|
|
|
it('should execute', function(done) {
|
|
it('should execute', function(done) {
|
|
- var url = 'http://www.google.fr';
|
|
|
|
|
|
+ var url = 'http://www.google.fr/';
|
|
|
|
|
|
this.timeout(15000);
|
|
this.timeout(15000);
|
|
phantomasWrapper.execute({
|
|
phantomasWrapper.execute({
|
|
@@ -21,11 +21,12 @@ describe('phantomasWrapper', function() {
|
|
should.not.exist(err);
|
|
should.not.exist(err);
|
|
|
|
|
|
json.should.be.an('object');
|
|
json.should.be.an('object');
|
|
- json.should.have.a.property('generator').that.contains('phantomas');
|
|
|
|
|
|
+ json.should.have.a.property('generator');
|
|
|
|
+ json.generator.should.contain('phantomas');
|
|
json.should.have.a.property('url').that.equals(url);
|
|
json.should.have.a.property('url').that.equals(url);
|
|
- json.should.have.a.property('metrics').that.is.an('object').not.empty();
|
|
|
|
- json.should.have.a.property('offenders').that.is.an('object').not.empty();
|
|
|
|
- json.offenders.should.have.a.property('javascriptExecutionTree').that.is.a('string');
|
|
|
|
|
|
+ json.should.have.a.property('metrics').that.is.an('object').not.empty;
|
|
|
|
+ json.should.have.a.property('offenders').that.is.an('object').not.empty;
|
|
|
|
+ json.offenders.should.have.a.property('javascriptExecutionTree').that.is.a('array').not.empty;
|
|
|
|
|
|
done();
|
|
done();
|
|
});
|
|
});
|