From ae8796a570dede7a2df6fe43fdf96c11444c014d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 29 Mar 2014 12:55:19 -0700 Subject: [PATCH] Tweak var names in `_.once` tests. --- test/test.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test.js b/test/test.js index e026b87a7..c13a2e219 100644 --- a/test/test.js +++ b/test/test.js @@ -6101,16 +6101,16 @@ (function() { test('should execute `func` once', 1, function() { var count = 0, - func = _.once(function() { count++; }); + once = _.once(function() { count++; }); - func(); - func(); + once(); + once(); strictEqual(count, 1); }); test('should not set a `this` binding', 1, function() { - var func = _.once(function() { this.count++; }), - object = { 'count': 0, 'once': func }; + var once = _.once(function() { this.count++; }), + object = { 'count': 0, 'once': once }; object.once(); object.once(); @@ -6120,26 +6120,26 @@ test('should ignore recursive calls', 1, function() { var count = 0; - var func = _.once(function() { + var once = _.once(function() { count++; func(); }); - func(); + once(); strictEqual(count, 1); }); test('should not throw more than once', 2, function() { var pass = true; - var func = _.once(function() { + var once = _.once(function() { throw new Error; }); - raises(function() { func(); }, Error); + raises(function() { once(); }, Error); try { - func(); + once(); } catch(e) { pass = false; }