We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given this lib/abd.dart
lib/abd.dart
/// This class is excellent /// ```dart /// void main() { /// print('hi'); /// main(); /// } /// ``` class Foo {}
> dart test 00:01 +0: loading test/dartdoc_test.dart Extracting code samples ... Analyzing code samples ... No tests ran. No tests were found.
I would have expected at least a single test to have run. If I make a syntax error it does indeed report a failed test.
The text was updated successfully, but these errors were encountered:
@takumma FYI, in case you're interested.
Sorry, something went wrong.
The issue I analyzed is that the dartdoc_test doesn't recognize or detect the test running inside the documentation.
Solution I proposed:
Modify test/dartdoc_test.dart to explicitly scan and run the code samples in lib/abd.dart
syntax:
import 'package:dartdoc_test/dartdoc_test.dart';
// main definition void main () { testDartdocExamples('lib/abd.dart'); }
Why this is helpful:
The tool might not automatically detect the test, so explicitly registering it forces dartdoc_test to analyze lib/abd.dart.
to run:
dart test
No branches or pull requests
Given this
lib/abd.dart
I would have expected at least a single test to have run. If I make a syntax error it does indeed report a failed test.
The text was updated successfully, but these errors were encountered: