search

goog.testing.recordFunction

Provided By

Wraps the function into another one which calls the inner function and records its calls. The recorded function will have 3 static methods: getCallCount, getCalls and getLastCall but won't inherit the original function's prototype and static fields.

recordFunction( opt_f ) function(...?): ?

Parameters
opt_fFunction=

The function to wrap and record. Defaults to goog.functions.UNDEFINED.

Returns
function(...?): ?

The wrapped function.

Properties