[Pkg-javascript-commits] [less.js] 25/26: get tests passing in chrome in sauce

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:25:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.1.0
in repository less.js.

commit 06aa30403888c72edba6c6d2b5d1c9be94638742
Author: Luke Page <luke.a.page at gmail.com>
Date:   Sun Nov 23 08:08:45 2014 +0000

    get tests passing in chrome in sauce
---
 test/browser/test-runner-template.tmpl | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/test/browser/test-runner-template.tmpl b/test/browser/test-runner-template.tmpl
index e504a30..c02c38f 100644
--- a/test/browser/test-runner-template.tmpl
+++ b/test/browser/test-runner-template.tmpl
@@ -59,6 +59,8 @@
 
 
         // allow sauce to query for the jasmine report
+        // because we have to load the page before starting the test, so the thing
+        // sauce queries for might not be setup yet
         window.jasmine = { getJSReport: function() { } };
         setTimeout(function() {
             var jasmine = <% toArray([].concat(scripts.polyfills, scripts.jasmine, scripts.boot)) %>,
@@ -69,6 +71,11 @@
                 allScripts = jasmine.concat(helpers).concat(vendor).concat(specs).concat(reporters);
 
             function addNextScript() {
+                // for sauce, see above. Additional step needed between loading jasmine and loading
+                // the js reporter
+                if (!jasmine.getJSReport) {
+                    jasmine.getJSReport = function() {};
+                }
                 if (allScripts.length) {
                     var scriptSrc = allScripts.shift();
                     loadScript(scriptSrc, addNextScript);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list