(file: string)
| 94 | } |
| 95 | |
| 96 | export function isTestFile(file: string): boolean { |
| 97 | // To be a test, you must be _test.dart AND inside a test folder (unless allowTestsOutsideTestFolder). |
| 98 | // https://github.com/Dart-Code/Dart-Code/issues/1165 |
| 99 | // https://github.com/Dart-Code/Dart-Code/issues/2021 |
| 100 | // https://github.com/Dart-Code/Dart-Code/issues/2034 |
| 101 | return !!file && isDartFile(file) |
| 102 | && ( |
| 103 | isInsideFolderNamed(file, "test") |
| 104 | || isInsideFolderNamed(file, "integration_test") |
| 105 | || isInsideFolderNamed(file, "test_driver") |
| 106 | || config.allowTestsOutsideTestFolder |
| 107 | ) |
| 108 | && file.toLowerCase().endsWith("_test.dart"); |
| 109 | } |
| 110 | |
| 111 | // Similar to isTestFile, but requires that the file is _test.dart because it will be used as |
| 112 | // an entry point for pub test running. |
no test coverage detected