search

goog.testing.GlobalFunctionMock

Provided By

Mocks a global / top-level function. Creates a goog.testing.MethodMock in the global scope with the name specified by functionName.

GlobalFunctionMock( functionName, opt_strictness ) goog.testing.MockInterface

Parameters
functionNamestring

The name of the function we're going to mock.

opt_strictnessnumber=

One of goog.testing.Mock.LOOSE or goog.testing.Mock.STRICT. The default is STRICT.

Returns
goog.testing.MockInterface

The mocked global function.