Skip to content

Commit

Permalink
removing json3 dependency in favor of qunit's deepEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Dec 3, 2012
1 parent 076adca commit 05585c6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 787 deletions.
6 changes: 3 additions & 3 deletions test/arrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ $(document).ready(function() {

test("flatten", function() {
var list = [1, [2], [3, [[[4]]]]];
equal(JSON.stringify(_.flatten(list)), '[1,2,3,4]', 'can flatten nested arrays');
equal(JSON.stringify(_.flatten(list, true)), '[1,2,3,[[[4]]]]', 'can shallowly flatten nested arrays');
deepEqual(_.flatten(list), [1,2,3,4], 'can flatten nested arrays');
deepEqual(_.flatten(list, true), [1,2,3,[[[4]]]], 'can shallowly flatten nested arrays');
var result = (function(){ return _.flatten(arguments); })(1, [2], [3, [[[4]]]]);
equal(JSON.stringify(result), '[1,2,3,4]', 'works on an arguments object');
deepEqual(result, [1,2,3,4], 'works on an arguments object');
});

test("without", function() {
Expand Down
1 change: 0 additions & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<title>Underscore Test Suite</title>
<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen">
<script src="vendor/json3.js"></script>
<script src="vendor/jquery.js"></script>
<script src="vendor/qunit.js"></script>
<script src="vendor/jslitmus.js"></script>
Expand Down
Loading

0 comments on commit 05585c6

Please sign in to comment.