Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrygusev committed Mar 5, 2013
1 parent 48e373a commit d83262e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ $(document).ready(function() {
} catch (ex) {
ifnull = ex;
}
ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly');
ok(ifnull instanceof TypeError, 'handles a null (without initial value) properly');

ok(_.reduce(null, function(){}, 138) === 138, 'handles a null (with initial value) properly');
equal(_.reduce([], function(){}, undefined), undefined, 'undefined can be passed as a special case');
Expand All @@ -105,7 +105,7 @@ $(document).ready(function() {
} catch (ex) {
ifnull = ex;
}
ok(ifnull instanceof TypeError, 'handles a null (without inital value) properly');
ok(ifnull instanceof TypeError, 'handles a null (without initial value) properly');

var sum = _.reduceRight({a: 1, b: 2, c: 3}, function(sum, num){ return sum + num; });
equal(sum, 6, 'default initial value on object');
Expand Down
2 changes: 1 addition & 1 deletion test/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ $(document).ready(function() {
test("wrap", function() {
var greet = function(name){ return "hi: " + name; };
var backwards = _.wrap(greet, function(func, name){ return func(name) + ' ' + name.split('').reverse().join(''); });
equal(backwards('moe'), 'hi: moe eom', 'wrapped the saluation function');
equal(backwards('moe'), 'hi: moe eom', 'wrapped the salutation function');

var inner = function(){ return "Hello "; };
var obj = {name : "Moe"};
Expand Down
4 changes: 2 additions & 2 deletions test/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $(document).ready(function() {
var result;
equal(_.extend({}, {a:'b'}).a, 'b', 'can extend an object with the attributes of another');
equal(_.extend({a:'x'}, {a:'b'}).a, 'b', 'properties in source override destination');
equal(_.extend({x:'x'}, {a:'b'}).x, 'x', 'properties not in source dont get overriden');
equal(_.extend({x:'x'}, {a:'b'}).x, 'x', 'properties not in source don't get overriden');
result = _.extend({x:'x'}, {a:'a'}, {b:'b'});
ok(_.isEqual(result, {x:'x', a:'a', b:'b'}), 'can extend from multiple source objects');
result = _.extend({x:'x'}, {a:'a', x:2}, {a:'b'});
Expand Down Expand Up @@ -98,7 +98,7 @@ $(document).ready(function() {
equal(options.zero, 0, 'value exists');
equal(options.one, 1, 'value exists');
equal(options.twenty, 20, 'default applied');
equal(options.nothing, null, "null isn't overriden");
equal(options.nothing, null, "null isn't overridden");

_.defaults(options, {empty: "full"}, {nan: "nan"}, {word: "word"}, {word: "dog"});
equal(options.empty, "", 'value exists');
Expand Down

0 comments on commit d83262e

Please sign in to comment.