static Fakes
Static class to create various fake objects.
attr(String name, Object value) => Attr
Creates a fake implementation of an Attr.
name
String
Name of the attribute.
[value]
Object
Value of the attribute.
return Attr
A fake object mimicking an Attr.
Attr
nodeList(Array data) => NodeList
Creates a fake implementation of a NodeList.
data
Array
Array that represents the data in the NodeList.
return NodeList
A fake object mimicking a NodeList.
NodeList
ofType(Function ctor) => Object
Creates a fake of the given constructor. The fake object's proto link will simply point to the constructor's prototype.
ctor
Function
The constructor of the object to create a fake of.
return Object
The fake object.