aboutsummaryrefslogtreecommitdiff
path: root/test/mocha/sourcemaps.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/mocha/sourcemaps.js')
-rw-r--r--test/mocha/sourcemaps.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mocha/sourcemaps.js b/test/mocha/sourcemaps.js
index aff2b009..8457c865 100644
--- a/test/mocha/sourcemaps.js
+++ b/test/mocha/sourcemaps.js
@@ -1,7 +1,7 @@
var assert = require("assert");
var readFileSync = require("fs").readFileSync;
var SourceMapConsumer = require("source-map").SourceMapConsumer;
-var UglifyJS = require("../..");
+var UglifyJS = require("../node");
function read(path) {
return readFileSync(path, "utf8");
@@ -244,7 +244,7 @@ describe("sourcemaps", function() {
assert.strictEqual(map.sourcesContent.length, 1);
assert.strictEqual(map.sourcesContent[0], code);
var encoded = result.code.slice(result.code.lastIndexOf(",") + 1);
- map = JSON.parse(new Buffer(encoded, "base64").toString());
+ map = JSON.parse(UglifyJS.to_ascii(encoded));
assert.strictEqual(map.sourcesContent.length, 1);
assert.strictEqual(map.sourcesContent[0], code);
result = UglifyJS.minify(result.code, {