Karma + Jasmine + nano.jar:怎么配置?

时间:2015-02-08 17:02:06

标签: java javascript applet karma-runner karma-jasmine

我正在使用带有业力和茉莉花的咕噜进行单元测试。

我想使用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

时会抛出404异常
  • 怎么办呢?
  • 我更喜欢仅使用业力的解决方案,我只使用jasmine-jquery,因为我没有成功只是业力。

0 个答案:

没有答案