A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Workiva/over_react_test below:

Workiva/over_react_test: A library for testing OverReact components

A library for testing OverReact components.

  1. Import it into your test files:

    import 'package:over_react_test/over_react_test.dart';
  2. Run your tests:

    $ dart run test test/your_test_file.dart
Usage Actual Type Suggested Referencing render and render helper functions ReactComponent | Element instance Component class ReactClass type VDOM Instance (invoked UiProps) ReactElement -ReactElement or not suffixed findDomNode, queryByTestId, etc. Element node The Dart component react.Component (backed by ReactComponent) dartInstance Invoked UiFactory UiProps builder

Example:

test('my test' () {
  var sampleBuilder = Sample();
  var sampleReactElement = sampleBuilder(); // Or var sample = sampleBuilder();
  var instance = render(sampleInstance);
  SampleComponent sampleDartInstance = getDartComponent(instance);
  var sampleNode = findDomNode(instance);
});

When coming up with test ID strings:

You would never skip reading the docs for a new language you are asked to learn, so please don't skip over reading our API documentation either.

Yes please! (Please read our contributor guidelines first)

The over_react_test library adheres to Semantic Versioning:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4