ReactShallowRenderer class
ReactShallowRenderer wrapper
Usage:
ReactShallowRenderer shallowRenderer = createRenderer();
shallowRenderer.render(div({'className': 'active'}));
ReactElement renderedOutput = shallowRenderer.getRenderOutput();
Map props = getProps(renderedOutput);
expect(props['className'], 'active');
See react_with_addons.js#ReactShallowRenderer
- Annotations
-
- @JS()
- @anonymous
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getRenderOutput(
) → ReactElement - Get the rendered output. render must be called first
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
ReactElement? element, [dynamic context]) → void -
toString(
) → String -
A string representation of this object.
inherited
-
unmount(
) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited