The Dart test package

The Dart test package is not part of the SDK itself, so it has to be installed as a normal third-party dependency. You should already know how to do this.

For reference, check the example, 4_unit_tests, in this chapter's source code on GitHub. The test code is located inside the test/ folder.

In this example (generated with the Stagehand tool), there is a development dependency; this is a dependency that is required only during development and not at runtime:

dev_dependencies:
test: ^1.0.0

This enables us to use the test package's provided libraries to write unit tests.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.113