init and run jasmine
[mkws-moved-to-github.git] / test / js / mkws-jasmine-run.js
1       (function() {
2         var jasmineEnv = jasmine.getEnv();
3         jasmineEnv.updateInterval = 1000;
4
5         var htmlReporter = new jasmine.HtmlReporter();
6
7         jasmineEnv.addReporter(htmlReporter);
8
9         jasmineEnv.specFilter = function(spec) {
10           return htmlReporter.specFilter(spec);
11         };
12
13         var currentWindowOnload = window.onload;
14
15         window.onload = function() {
16           if (currentWindowOnload) {
17             currentWindowOnload();
18           }
19           execJasmine();
20         };
21
22         function execJasmine() {
23           jasmineEnv.execute();
24         }
25
26       })();
27