[Pkg-javascript-commits] [node-browser-pack] 73/141: updated the tests for the latest //# source maps

Bastien Roucariès rouca at moszumanska.debian.org
Thu May 4 10:23:26 UTC 2017


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

rouca pushed a commit to branch master
in repository node-browser-pack.

commit 93c85b641cd859bb0871fa33455105ccdc6673bf
Author: James Halliday <mail at substack.net>
Date:   Mon Nov 18 14:50:53 2013 +0800

    updated the tests for the latest //# source maps
---
 package.json                 | 6 +++---
 test/source-maps-existing.js | 2 +-
 test/source-maps.js          | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/package.json b/package.json
index 0fdeb33..943ec8a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "browser-pack",
-    "version": "0.11.1",
+    "version": "0.11.2",
     "description": "pack node-style source files from a json stream into a browser bundle",
     "main": "index.js",
     "bin": {
@@ -9,14 +9,14 @@
     "dependencies": {
         "JSONStream": "~0.6.4",
         "through": "~2.3.4",
-        "combine-source-map": "~0.2.0"
+        "combine-source-map": "~0.3.0"
 
     },
     "devDependencies": {
         "tap": "~0.4.0",
         "tape": "~0.2.2",
         "uglify-js": "1.3.5",
-        "convert-source-map": "~0.2.3",
+        "convert-source-map": "~0.3.1",
         "parse-base64vlq-mappings": "~0.1.1"
     },
     "scripts": {
diff --git a/test/source-maps-existing.js b/test/source-maps-existing.js
index d07bc29..c6f2ae0 100644
--- a/test/source-maps-existing.js
+++ b/test/source-maps-existing.js
@@ -1,6 +1,6 @@
 var test = require('tape');
 var pack = require('../');
-var convert= require('convert-source-map');
+var convert = require('convert-source-map');
 var parse = require('parse-base64vlq-mappings');
 
 var foo = { 
diff --git a/test/source-maps.js b/test/source-maps.js
index d03383e..dceb2e2 100644
--- a/test/source-maps.js
+++ b/test/source-maps.js
@@ -28,7 +28,7 @@ test('pack one file with source file field and one without', function (t) {
         var lastLine = grabLastLine(src);
         var sm = grabSourceMap(lastLine);
 
-        t.ok(/^\/\/@ sourceMappingURL/.test(lastLine), 'contains source mapping url as last line');
+        t.ok(/^\/\/# sourceMappingURL/.test(lastLine), 'contains source mapping url as last line');
         t.deepEqual(sm.sources, [ 'foo.js' ], 'includes mappings for sourceFile only');
         t.equal(sm.mappings, ';;;AAAA;AACA;AACA;AACA', 'adds offset mapping for each line' );
     });
@@ -62,7 +62,7 @@ test('pack two files with source file field', function (t) {
         var lastLine = grabLastLine(src);
         var sm = grabSourceMap(lastLine);
 
-        t.ok(/^\/\/@ sourceMappingURL/.test(lastLine), 'contains source mapping url as last line');
+        t.ok(/^\/\/# sourceMappingURL/.test(lastLine), 'contains source mapping url as last line');
         t.deepEqual(sm.sources, [ 'wunder/bar.js', 'foo.js' ], 'includes mappings for both files');
         t.equal(sm.mappings, ';AAAA;;ACAA;AACA;AACA;AACA', 'adds offset mapping for each line' );
     });
@@ -95,7 +95,7 @@ test('pack two files without source file field', function (t) {
         t.equal(r('xyz')(5), 555);
 
         var lastLine = grabLastLine(src); 
-        t.notOk(/^\/\/@ sourceMappingURL/.test(lastLine), 'contains no source mapping url');
+        t.notOk(/^\/\/# sourceMappingURL/.test(lastLine), 'contains no source mapping url');
     });
     
     p.end(JSON.stringify([
@@ -126,7 +126,7 @@ test('pack two files with source file field, one with nomap flag', function (t)
         var lastLine = grabLastLine(src);
         var sm = grabSourceMap(lastLine);
 
-        t.ok(/^\/\/@ sourceMappingURL/.test(lastLine), 'contains source mapping url as last line');
+        t.ok(/^\/\/# sourceMappingURL/.test(lastLine), 'contains source mapping url as last line');
         t.deepEqual(sm.sources, [ 'wunder/bar.js' ], 'includes mappings for only the file without the "nomap" flag');
         t.equal(sm.mappings, ';AAAA', 'adds offset mapping for each line of mapped file' );
         t.end()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-browser-pack.git



More information about the Pkg-javascript-commits mailing list