コールバック内にあるテストを実行することは可能ですか? たとえば、私は
System.import("mymodule").then(function(Mymodule) {
describe("Mymodule", function() {
it("does something", function() {
expect(Mymodule.dosomething()).toBeTruthy();
});
});
});
このテストは実行されません。単純なものでも同じですsetTimeout
var Mymodule = { dosomething: function(){ return true; } };
setTimeout(function() {
describe("Mymodule", function() {
it("does something", function() {
expect(Mymodule.dosomething()).toBeTruthy();
});
});
});
これを行う方法はありますか?それ以外の場合、モジュールを非同期で含む多くの問題があります