-
Notifications
You must be signed in to change notification settings - Fork 23
Description
The workspace tests (see #138) run 11 tests in just 1 second, or about 0.1 sec/test. The existing executable_test.dart tests run 25 tests in 1:40, or about 4 sec/test. That's not prohibitively long, but maybe it can be improved.
Both tests generate directories and files to disk in the same way and run the tool on those files. The main difference is that instead of calling dart run dependency_validator and checking the output, the workspace tests call checkPackage() directly and don't spawn any new processes.
The original tests do more than just check the return value though. They also check the stdout, stderr, and exit code, so they use Process.start. They can probably be rewritten to use checkPackage() directly with a custom logger, and use stream matchers from package:test instead of checking the entire process output.
If this results in tests that run similarly to the workspace tests, that could mean the 25 tests will be complete in about 2.5 seconds -- an over 95% speedup.