Fixes 4.0.0-pre Windows tests.
authorJakub Pawlowicz <contact@jakubpawlowicz.com>
Sat, 17 Dec 2016 10:23:38 +0000 (11:23 +0100)
committerJakub Pawlowicz <contact@jakubpawlowicz.com>
Sat, 17 Dec 2016 11:01:16 +0000 (12:01 +0100)
Why:

* This is because of line breaks difference between platforms.

test/source-map-test.js

index f648367..f4a4fd4 100644 (file)
@@ -1309,8 +1309,8 @@ vows.describe('source-map')
         },
         'has embedded sources content': function (minified) {
           assert.deepEqual(JSON.parse(minified.sourceMap.toString()).sourcesContent, [
-            '.one { color:#f00; }\n',
-            '.three {background-image: url(extra/down.gif);}\n'
+            '.one { color:#f00; }' + lineBreak,
+            '.three {background-image: url(extra/down.gif);}' + lineBreak
           ]);
         }
       },
@@ -1557,7 +1557,7 @@ vows.describe('source-map')
           assert.deepEqual(JSON.parse(minified.sourceMap.toString()).sourcesContent, [
             'div {\n  color: red;\n}\n',
             'section {\n  > div a {\n    color:red;\n  }\n}\n',
-            'div > a {\n  color: blue;\n}\n'
+            'div > a {' + lineBreak + '  color: blue;' + lineBreak + '}' + lineBreak
           ]);
         }
       },
@@ -1628,7 +1628,7 @@ vows.describe('source-map')
         'has embedded sources content': function (errors, minified) {
           assert.deepEqual(JSON.parse(minified.sourceMap.toString()).sourcesContent, [
             'div {\n  color: red;\n}\n',
-            'section {\n  > div a {\n    color:red;\n  }\n}\n',
+            'section {' + lineBreak + '  > div a {' + lineBreak + '    color:red;' + lineBreak + '  }' + lineBreak + '}' + lineBreak,
             'div > a {\n  color: blue;\n}\n'
           ]);
         },
@@ -1676,7 +1676,7 @@ vows.describe('source-map')
         'has embedded sources content': function (minified) {
           assert.deepEqual(JSON.parse(minified.sourceMap.toString()).sourcesContent, [
             null,
-            'section {\n  > div a {\n    color:red;\n  }\n}\n',
+            'section {' + lineBreak + '  > div a {' + lineBreak + '    color:red;' + lineBreak + '  }' + lineBreak + '}' + lineBreak,
             'div > a {\n  color: blue;\n}\n'
           ]);
         },
@@ -1721,7 +1721,7 @@ vows.describe('source-map')
         'has embedded sources content': function (minified) {
           assert.deepEqual(JSON.parse(minified.sourceMap.toString()).sourcesContent, [
             null,
-            'section {\n  > div a {\n    color:red;\n  }\n}\n',
+            'section {' + lineBreak + '  > div a {' + lineBreak + '    color:red;' + lineBreak + '  }' + lineBreak + '}' + lineBreak,
             null
           ]);
         }