Remove unnecessary "include" file

The `fnExists` function defines a generic way to determine if any number
of values are function instances. Because it is only used by a single
test, the additional complexity required by the generalized code (and
the organizational drawbacks to maintaining another "include" file) are
not justified. Remove the file and update the test to assert the
function's existence directly.
This commit is contained in:
Mike Pennisi 2015-06-26 12:34:04 -04:00
parent afd6450bd2
commit f8e18ccd76
2 changed files with 1 additions and 9 deletions

View File

@ -1,7 +0,0 @@
//-----------------------------------------------------------------------------
function fnExists(/*arguments*/) {
for (var i = 0; i < arguments.length; i++) {
if (typeof (arguments[i]) !== "function") return false;
}
return true;
}

View File

@ -12,7 +12,6 @@ description: >
flags: [noStrict]
includes:
- runTestCase.js
- fnExists.js
---*/
function testcase() {
@ -20,7 +19,7 @@ function testcase() {
// Now, deleting 'foo' directly should fail;
var d = delete foo;
if(d === false && fnExists(foo))
if(d === false && typeof foo === 'function')
return true;
}
runTestCase(testcase);