From 6d86b3a95015fed80a9a0a49f6df266fe293b057 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 10 May 2013 22:57:08 -0700 Subject: [PATCH] Add `_.has` unit test. Former-commit-id: 3334651f8d29e6aa006184846b128acd006157ef --- test/test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/test.js b/test/test.js index 5ff378c08..7155a425d 100644 --- a/test/test.js +++ b/test/test.js @@ -1282,6 +1282,18 @@ /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.has'); + + (function() { + test('should return `false` for primitives', function() { + _.each(falsey.concat(1, 'a'), function(value) { + strictEqual(_.has(value, 'valueOf'), false); + }); + }); + }()); + + /*--------------------------------------------------------------------------*/ + QUnit.module('lodash.indexOf'); (function() {