goog.testing
Functions
createConstructorMock( scope, constructorName, opt_strictness ) → goog.testing.MockInterface
goog.testing.MockInterface
Convenience method for creating a mock for a constructor. Copies class members to the mock.
When mocking a constructor to return a mocked instance, remember to create the instance mock before mocking the constructor. If you mock the constructor first, then the mock framework will be unable to examine the prototype chain when creating the mock instance.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
createFunctionMock( opt_functionName, opt_strictness ) → goog.testing.MockInterface
goog.testing.MockInterface
Convenience method for creating a mock for a function.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
createGlobalFunctionMock( functionName, opt_strictness ) → goog.testing.MockInterface
goog.testing.MockInterface
Convenience method for creating a mocks for a global / top-level function.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
createMethodMock( scope, functionName, opt_strictness ) → goog.testing.MockInterface
goog.testing.MockInterface
Convenience method for creating a mock for a method.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
testSuite( arg0, arg1 ) → void
void
Parameters |
|
---|
Properties
async → {MockControl: function(new: goog.testing.async.MockControl, (goog.testing.MockControl|null))}
{MockControl: function(new: goog.testing.async.MockControl, (goog.testing.MockControl|null))}
No information.
editor → {FieldMock: function(new: goog.testing.editor.FieldMock, (Window|null)=, (Window|null)=, (goog.dom.AbstractRange|null)=), TestHelper: function(new: goog.testing.editor.TestHelper, (Element|null)), dom: goog.testing.editor.dom}
{FieldMock: function(new: goog.testing.editor.FieldMock, (Window|null)=, (Window|null)=, (goog.dom.AbstractRange|null)=), TestHelper: function(new: goog.testing.editor.TestHelper, (Element|null)), dom: goog.testing.editor.dom}
No information.
i18n → {asserts: goog.testing.i18n.asserts, whitespace: goog.testing.i18n.whitespace}
{asserts: goog.testing.i18n.asserts, whitespace: goog.testing.i18n.whitespace}
No information.
messaging → {MockMessageChannel: function(new: goog.testing.messaging.MockMessageChannel, (goog.testing.MockControl|null)), MockMessageEvent: function(new: goog.testing.messaging.MockMessageEvent, *, string=, string=, (Window|null)=, (Array<(MessagePort|null)>|null)=), MockMessagePort: function(new: goog.testing.messaging.MockMessagePort, *, (goog.testing.MockControl|null)), MockPortNetwork: function(new: goog.testing.messaging.MockPortNetwork, goog.testing.MockControl)}
{MockMessageChannel: function(new: goog.testing.messaging.MockMessageChannel, (goog.testing.MockControl|null)), MockMessageEvent: function(new: goog.testing.messaging.MockMessageEvent, *, string=, string=, (Window|null)=, (Array<(MessagePort|null)>|null)=), MockMessagePort: function(new: goog.testing.messaging.MockMessagePort, *, (goog.testing.MockControl|null)), MockPortNetwork: function(new: goog.testing.messaging.MockPortNetwork, goog.testing.MockControl)}
No information.
net → {MockIFrameIo: function(new: goog.testing.net.MockIFrameIo, (goog.testing.TestQueue|null)), XhrIo: function(new: goog.testing.net.XhrIo, (goog.testing.TestQueue|null)=), XhrIoPool: function(new: goog.testing.net.XhrIoPool, (goog.testing.net.XhrIo|null)=)}
{MockIFrameIo: function(new: goog.testing.net.MockIFrameIo, (goog.testing.TestQueue|null)), XhrIo: function(new: goog.testing.net.XhrIo, (goog.testing.TestQueue|null)=), XhrIoPool: function(new: goog.testing.net.XhrIoPool, (goog.testing.net.XhrIo|null)=)}
No information.
storage → {FakeMechanism: function(new: goog.testing.storage.FakeMechanism)}
{FakeMechanism: function(new: goog.testing.storage.FakeMechanism)}
No information.
ui → {RendererHarness: function(new: goog.testing.ui.RendererHarness, (goog.ui.ControlRenderer|null), (Element|null), (Element|null)), rendererasserts: goog.testing.ui.rendererasserts, style: goog.testing.ui.style}
{RendererHarness: function(new: goog.testing.ui.RendererHarness, (goog.ui.ControlRenderer|null), (Element|null), (Element|null)), rendererasserts: goog.testing.ui.rendererasserts, style: goog.testing.ui.style}
No information.