Forrest logo
back to the dart tool

dart:tldr:50d9d

dart: Run unit tests for the current project.
$ dart test
try on your machine

The dart test command is used for running tests in the Dart programming language.

When you run dart test, it looks for test files in your project's directory and subdirectories. These test files usually have names like *_test.dart or *_test_suite.dart.

The command then executes the tests defined in these files, providing you with the results.

Dart uses the test package for testing, which provides various APIs and utilities for defining and running tests. You can define tests using functions or test cases, and use various assertions to check expected values. The dart test command takes care of running these tests and reporting the results to you.

By running tests with dart test, you can ensure that your Dart code is functioning as expected and catch any bugs or errors.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dart tool