有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

爪哇业力+茉莉花+纳米。jar:如何配置?

我使用grunt和karma和jasmine进行单元测试

我想使用nano.jarjava小程序来测试一些代码的计时(如benchmark.js所示)

但我不知道如何告诉karma将小程序的html加载到页面

<applet code="nano" archive="nano.jar"></applet>

我在karma中读到了Fixture,也读到了jasmine jquery Fixture,但我似乎无法让它们发挥作用

现在我有这个因果报应。形态:

config.set({
    basePath: '',
    frameworks: ['jasmine'],
    files: [
      {pattern: '../tests/fixtures/bla.htm', watched: true, served: true, included: false},
      '../tests/**/*.js'
    ]
}

在{}中:

<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异常

  • 如何做到这一点
  • 我更喜欢只使用karma的解决方案,我使用jasmine jquery只是因为我没有成功地使用karma

共 (0) 个答案