Lines Matching refs:isCallable
6 var isCallable = require('./'); variable
52 st.notOk(isCallable(), 'undefined is not callable');
53 st.notOk(isCallable(null), 'null is not callable');
54 st.notOk(isCallable(false), 'false is not callable');
55 st.notOk(isCallable(true), 'true is not callable');
59 t.notOk(isCallable([]), 'array is not callable');
60 t.notOk(isCallable({}), 'object is not callable');
61 t.notOk(isCallable(/a/g), 'regex literal is not callable');
62 t.notOk(isCallable(new RegExp('a', 'g')), 'regex object is not callable');
63 t.notOk(isCallable(new Date()), 'new Date() is not callable');
66 st.notOk(isCallable(42), 'number is not callable');
67 st.notOk(isCallable(Object(42)), 'number object is not callable');
68 st.notOk(isCallable(NaN), 'NaN is not callable');
69 st.notOk(isCallable(Infinity), 'Infinity is not callable');
74 st.notOk(isCallable('foo'), 'string primitive is not callable');
75 st.notOk(isCallable(Object('foo')), 'string object is not callable');
82 st.equal(true, isCallable(Foo), 'sanity check: Foo is callable');
83 st.equal(false, isCallable(new Foo()), 'instance of Foo is not callable');
98 t.notOk(isCallable(fakeFunction), 'fake Function with @@toStringTag "Function" is not callable');
115 t.ok(isCallable(noop), 'function is callable');
116 t.ok(isCallable(classFake), 'function with name containing "class" is callable');
117 t.ok(isCallable(returnClass), 'function with string " class " is callable');
118 t.ok(isCallable(isCallable), 'isCallable is callable');
128 st.ok(isCallable(global[typedArray]), typedArray + ' is callable');
135 t.ok(isCallable(genFn), 'generator function is callable');
140 t.ok(isCallable(arrowFn), 'arrow function is callable');
141 t.ok(isCallable(weirdlyCommentedArrowFn), 'weirdly commented arrow functions are callable');
146 t.notOk(isCallable(classConstructor), 'class constructors are not callable');
147 …t.notOk(isCallable(commentedClass), 'class constructors with comments in the signature are not cal…
148 …t.notOk(isCallable(commentedClassOneLine), 'one-line class constructors with comments in the signa…
149 t.notOk(isCallable(classAnonymous), 'anonymous class constructors are not callable');
150 …t.notOk(isCallable(classAnonymousCommentedOneLine), 'anonymous one-line class constructors with co…
155 t.ok(isCallable(asyncFn), '`async function`s are callable');
156 t.ok(isCallable(asyncArrowFn), '`async` arrow functions are callable');