From 14c2dabff12b5b2d9c9d76dd0a5387ac921bc65c Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 20 Aug 2013 16:50:47 +0200 Subject: [PATCH] init and run jasmine --- test/README.txt | 2 ++ test/js/mkws-jasmine-run.js | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 test/js/mkws-jasmine-run.js diff --git a/test/README.txt b/test/README.txt index 663450f..ff2215f 100644 --- a/test/README.txt +++ b/test/README.txt @@ -2,6 +2,8 @@ Jasmine / jasmine-node test frame works ------------------------------------- ./spec contains *spec.js files +./js jasmine runtime JS lib + README.txt this file Documentation diff --git a/test/js/mkws-jasmine-run.js b/test/js/mkws-jasmine-run.js new file mode 100644 index 0000000..f3364b6 --- /dev/null +++ b/test/js/mkws-jasmine-run.js @@ -0,0 +1,27 @@ + (function() { + var jasmineEnv = jasmine.getEnv(); + jasmineEnv.updateInterval = 1000; + + var htmlReporter = new jasmine.HtmlReporter(); + + jasmineEnv.addReporter(htmlReporter); + + jasmineEnv.specFilter = function(spec) { + return htmlReporter.specFilter(spec); + }; + + var currentWindowOnload = window.onload; + + window.onload = function() { + if (currentWindowOnload) { + currentWindowOnload(); + } + execJasmine(); + }; + + function execJasmine() { + jasmineEnv.execute(); + } + + })(); + -- 1.7.10.4