我正在使用带有业力和茉莉花的咕噜进行单元测试。
我想使用nano.jar
java applet来测试某些代码的时间安排(如benchmark.js所示)。
但我无法弄清楚如何告诉业力将小程序的html加载到页面。
<applet code="nano" archive="nano.jar"></applet>
我读到了业力中的灯具以及jasmine-jquery灯具,但我似乎无法让它们发挥作用。
目前我有这个karma.conf:
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
{pattern: '../tests/fixtures/bla.htm', watched: true, served: true, included: false},
'../tests/**/*.js'
]
}
这是bla.htm
:
<applet code="nano" archive="nano.jar"></applet>
这在我的测试文件中:
describe("testing perf", function() {
beforeEach(function() {
jasmine.getFixtures().fixturesPath = 'base/tests/fixtures';
loadFixtures('bla.htm');
});
it("lalala", function() {
// use nanoseconds here
});
});
但是由于某些原因,jasmine-jquery在尝试加载base/tests/fixtures/bla.htm