Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Sep 29, 2012
Todd Wolfson Fuck this. The 'one character' output is lost in this implementation.…
… Going to re-port Crockford's c version
6a47492
Showing with 6 additions and 6 deletions.
  1. +6 −6 tests/jsmin.test.js
12 tests/jsmin.test.js
View
@@ -6,13 +6,13 @@ var assert = require('assert'),
expectedJQueryMin1 = fs.readFileSync(__dirname + '/test_files/jquery.min.1.js', 'utf8'),
expectedJQueryMin2 = fs.readFileSync(__dirname + '/test_files/jquery.min.2.js', 'utf8'),
expectedJQueryMin3 = fs.readFileSync(__dirname + '/test_files/jquery.min.3.js', 'utf8'),
- actualJQueryMin1 = jsmin.jsmin(jquerySrc, 1),
- actualJQueryMin2 = jsmin.jsmin(jquerySrc, 2),
- actualJQueryMin3 = jsmin.jsmin(jquerySrc, 3);
+ actualJQueryMin1 = jsmin.jsmin(jquerySrc, {level: 1}).code,
+ actualJQueryMin2 = jsmin.jsmin(jquerySrc, {level: 2}).code,
+ actualJQueryMin3 = jsmin.jsmin(jquerySrc, {level: 3}).code;
-fs.writeFileSync(__dirname + '/test_files/jquery.min.1.js', actualJQueryMin1, 'utf8');
-fs.writeFileSync(__dirname + '/test_files/jquery.min.2.js', actualJQueryMin2, 'utf8');
-fs.writeFileSync(__dirname + '/test_files/jquery.min.3.js', actualJQueryMin3, 'utf8');
+// fs.writeFileSync(__dirname + '/test_files/jquery.min.1.js', actualJQueryMin1, 'utf8');
+// fs.writeFileSync(__dirname + '/test_files/jquery.min.2.js', actualJQueryMin2, 'utf8');
+// fs.writeFileSync(__dirname + '/test_files/jquery.min.3.js', actualJQueryMin3, 'utf8');
// Output to debug
fs.writeFileSync(__dirname + '/jsmin.debug.js', actualJQueryMin1, 'utf8');

No commit comments for this range

Something went wrong with that request. Please try again.