[Pkg-javascript-commits] [less.js] 31/285: Fix the browser tests

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


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

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

commit 2ac8617987b7fb3bc45273b3a83fa38282ecd6bf
Author: Luke Page <luke.a.page at gmail.com>
Date:   Sat Mar 1 17:25:01 2014 +0000

    Fix the browser tests
---
 lib/less/environments/browser.js                 |  3 +++
 test/browser/runner-browser-options.js           |  3 ++-
 test/browser/runner-errors-options.js            |  4 ++--
 test/browser/runner-global-vars-options.js       | 10 ++++++----
 test/browser/runner-legacy-options.js            |  8 +++++---
 test/browser/runner-main-options.js              |  5 ++++-
 test/browser/runner-modify-vars-options.js       |  5 ++++-
 test/browser/runner-no-js-errors-options.js      |  2 +-
 test/browser/runner-postProcessor-options.js     |  3 ++-
 test/browser/runner-production-options.js        |  3 ++-
 test/browser/runner-relative-urls-options.js     |  3 ++-
 test/browser/runner-rootpath-options.js          |  3 ++-
 test/browser/runner-rootpath-relative-options.js |  3 ++-
 13 files changed, 37 insertions(+), 18 deletions(-)

diff --git a/lib/less/environments/browser.js b/lib/less/environments/browser.js
index a8fe835..26b74cf 100644
--- a/lib/less/environments/browser.js
+++ b/lib/less/environments/browser.js
@@ -46,6 +46,9 @@ return {
     },
     getCleanCSS: function () {
     },
+    supportsDataURI: function() {
+        return false;
+    },
     pathDiff: function pathDiff(url, baseUrl) {
         // diff between two paths to create a relative path
 
diff --git a/test/browser/runner-browser-options.js b/test/browser/runner-browser-options.js
index 3d73323..6eadfd6 100644
--- a/test/browser/runner-browser-options.js
+++ b/test/browser/runner-browser-options.js
@@ -1,4 +1,4 @@
-var less = {};
+var less = {logLevel: 4, errorReporting: "console"};
 
 // There originally run inside describe method. However, since they have not
 // been inside it, they run at jasmine compile time (not runtime). It all
@@ -11,6 +11,7 @@ var testFiles = ['charsets', 'colors', 'comments', 'css-3', 'strings', 'media',
     testSheets = [];
 
 // setup style tags with less and link tags pointing to expected css output
+
 for (var i = 0; i < testFiles.length; i++) {
   var file = testFiles[i],
       lessPath  = '/test/less/' + file + '.less',
diff --git a/test/browser/runner-errors-options.js b/test/browser/runner-errors-options.js
index 840ba5d..1ed092e 100644
--- a/test/browser/runner-errors-options.js
+++ b/test/browser/runner-errors-options.js
@@ -1,5 +1,5 @@
 var less = {
     strictUnits: true,
-    strictMath: true
-};
+    strictMath: true,
+    logLevel: 4 };
 
diff --git a/test/browser/runner-global-vars-options.js b/test/browser/runner-global-vars-options.js
index f313b2f..859751a 100644
--- a/test/browser/runner-global-vars-options.js
+++ b/test/browser/runner-global-vars-options.js
@@ -1,4 +1,6 @@
-var less = {};
-less.globalVars = {
-  "@global-var": "red"
-};
+var less = {
+    logLevel: 4,
+    errorReporting: "console",
+    globalVars: {
+        "@global-var": "red"
+}};
diff --git a/test/browser/runner-legacy-options.js b/test/browser/runner-legacy-options.js
index 9e4b959..eb53e35 100644
--- a/test/browser/runner-legacy-options.js
+++ b/test/browser/runner-legacy-options.js
@@ -1,4 +1,6 @@
-var less = {};
-less.strictMath = false;
-less.strictUnits = false;
+var less = {
+    logLevel: 4,
+    errorReporting: "console",
+    strictMath: false,
+    strictUnits: false };
 
diff --git a/test/browser/runner-main-options.js b/test/browser/runner-main-options.js
index df51782..f8e0b8b 100644
--- a/test/browser/runner-main-options.js
+++ b/test/browser/runner-main-options.js
@@ -1,4 +1,7 @@
-var less = {};
+var less = {
+    logLevel: 4,
+    errorReporting: "console"
+};
 less.strictMath = true;
 less.functions = {
   add: function(a, b) {
diff --git a/test/browser/runner-modify-vars-options.js b/test/browser/runner-modify-vars-options.js
index 2799ad5..1516f54 100644
--- a/test/browser/runner-modify-vars-options.js
+++ b/test/browser/runner-modify-vars-options.js
@@ -1,2 +1,5 @@
 /* exported less */
-var less = {};
\ No newline at end of file
+var less = {
+    logLevel: 4,
+    errorReporting: "console"
+};
\ No newline at end of file
diff --git a/test/browser/runner-no-js-errors-options.js b/test/browser/runner-no-js-errors-options.js
index 2a46494..825de5c 100644
--- a/test/browser/runner-no-js-errors-options.js
+++ b/test/browser/runner-no-js-errors-options.js
@@ -1,4 +1,4 @@
-var less = {};
+var less = {logLevel: 4};
 
 less.strictUnits = true;
 less.javascriptEnabled = false;
diff --git a/test/browser/runner-postProcessor-options.js b/test/browser/runner-postProcessor-options.js
index 94044da..fe7111b 100644
--- a/test/browser/runner-postProcessor-options.js
+++ b/test/browser/runner-postProcessor-options.js
@@ -1,4 +1,5 @@
-var less = {};
+var less = {logLevel: 4,
+    errorReporting: "console"};
 less.postProcessor = function(styles) {
     return 'hr {height:50px;}\n' + styles;
 };
diff --git a/test/browser/runner-production-options.js b/test/browser/runner-production-options.js
index f8189d6..2737aba 100644
--- a/test/browser/runner-production-options.js
+++ b/test/browser/runner-production-options.js
@@ -1,3 +1,4 @@
-var less = {};
+var less = {logLevel: 4,
+    errorReporting: "console"};
 less.env = "production";
 
diff --git a/test/browser/runner-relative-urls-options.js b/test/browser/runner-relative-urls-options.js
index a20eb59..3dcbad1 100644
--- a/test/browser/runner-relative-urls-options.js
+++ b/test/browser/runner-relative-urls-options.js
@@ -1,3 +1,4 @@
-var less = {};
+var less = {logLevel: 4,
+    errorReporting: "console"};
 less.relativeUrls = true;
 
diff --git a/test/browser/runner-rootpath-options.js b/test/browser/runner-rootpath-options.js
index 65cb1f1..f1aa52c 100644
--- a/test/browser/runner-rootpath-options.js
+++ b/test/browser/runner-rootpath-options.js
@@ -1,3 +1,4 @@
-var less = {};
+var less = {logLevel: 4,
+    errorReporting: "console"};
 less.rootpath = "https://localhost/";
 
diff --git a/test/browser/runner-rootpath-relative-options.js b/test/browser/runner-rootpath-relative-options.js
index f97baa4..df4d883 100644
--- a/test/browser/runner-rootpath-relative-options.js
+++ b/test/browser/runner-rootpath-relative-options.js
@@ -1,4 +1,5 @@
-var less = {};
+var less = {logLevel: 4,
+    errorReporting: "console"};
 less.rootpath = "https://www.github.com/cloudhead/less.js/";
 less.relativeUrls = true;
 

-- 
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