I'm using funcunit for testing my JavascriptMVC application. It opens a new browser window where it runs my application. I wish it also closed the window after tests.
How to do that?
I'm using funcunit for testing my JavascriptMVC application. It opens a new browser window where it runs my application. I wish it also closed the window after tests.
How to do that?
Call S.win.close() to close the window opened by funcunit . You can also access other stuff loaded in that like , accessing jQuery instance of that dom using S.win.$
Call:
FuncUnit._window.close();
It will close the opened window of the test.
module('General',{
setup: function() {
S.open('test.html');
},
teardown: function() {
S._window.close();
}
});
test('Test', function() {
ok(true, 'I live again');
});