Skip to content

Commit

Permalink
Added basic file -- now failing =D
Browse files Browse the repository at this point in the history
  • Loading branch information
twolfson committed Oct 15, 2012
1 parent a499a0c commit da67486
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/expected_files/basic.min.js
@@ -0,0 +1,2 @@

var a={"b":"c"};
8 changes: 8 additions & 0 deletions tests/jsmin.test.js
Expand Up @@ -37,6 +37,14 @@ for (; i < len; i++) {
assert.strictEqual(char, srcChar, 'Character at ' + i + ' does not match source character at ' + srcIndex + '.');
}

// Assert that basic matches as expected
var basicSrc = fs.readFileSync(testFilesDir + '/basic.js', 'utf8'),
expectedBasic = fs.readFileSync(expectedDir + '/basic.min.js', 'utf8'),
actualBasic = jsmin(basicSrc),
actualBasicCode = actualBasic.code,
actualBasicMap = actualBasic.codeMap;

assert.strictEqual(expectedBasic, actualBasicCode, 'Minified basic does not match as expected.');

// Log success when done
console.log('Success!');
3 changes: 3 additions & 0 deletions tests/test_files/basic.js
@@ -0,0 +1,3 @@
var a = {
"b": "c"
};

0 comments on commit da67486

Please sign in to comment.