If anyone else encounters the same situation, I have found a solution to get around the problem: use chai expect instead of chai should.
The above code would be transformed this way:
var app = require('../app).app, // this is express but you don't care
chai = require('chai'),
expect = chai.expect,
Browser = require('zombie'),
browser = new Browser();
describe("page", function() {
it('should not have a the whatever element', function(done) {
browser.visit('http://localhost:3000', function() {
expect(browser.query('#whatever')).not.to.exist;
done();
});
});
});
The expect assertion will fail if the #whatever exists, otherwise it will pass.