-
Notifications
You must be signed in to change notification settings - Fork 1
Description
In my work with the DOM Testing a get an other issue with testing applications in this testing framework:
if I init my application for example by this:
setup(function(){
var Option = {container:"Filebrowser"};
FB.init(Option);
});
(it a mocha notification for tdd)
Igot the problem, that the application isn
t ready. This means all HTML stuff that will be loaded by the application isnt available, allthoug i started testing after loading the complete HTML stuff. This isn
t the a problem of document.readyState. This is a problem of the differnt loading-times of the application itself.
I solved this by using a ready
event inside of the application and it works:
test("Default Container with id=FB created",function(){
FB.ready(function(){
assert.that("",has.tag("Filebrowser"));
});
});
But is that a good way of testing? Could we get these things into the testing framework, maybe by settings?
Otherwise i can set some timeout with mocha, but this isn`t a good way to, I think.
Nobody could tell me, when the application is completly ready with thier dom building stuff.