- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/artsy/benv
- 软件文档: https://github.com/artsy/benv/blob/master/README.md
- 官方下载: https://github.com/artsy/benv
软件介绍
Benv是node.js开发的无界面浏览器测试环境,用于测试客户端代码。
示例代码:
var benv = require('benv');beforeEach(function(done) { benv.setup(function() { benv.expose({
$: benv.require('../client/vendor/zepto.js', 'Zepto')
}); done();
});
});afterEach(function() { benv.teardown();
});describe('app.js', function() { it('renders Wat', function() { require('../client/app.js'); $('body').html().should.include('Wat!?');
});
});
