Index: lib/src/io.dart |
diff --git a/lib/src/io.dart b/lib/src/io.dart |
index 78b43afb02bc1c8e62a6376322889b5b827009c9..ea9709d232c60bbc698081f5519372e7c1b25b59 100644 |
--- a/lib/src/io.dart |
+++ b/lib/src/io.dart |
@@ -488,10 +488,8 @@ final bool runningAsTest = |
/// Whether the current process is one of pub's test files being run through the |
/// test package's test runner. |
/// |
-/// The test runner starts all tests from an entrypoint called |
-/// "runInIsolate.dart'> |
-final bool runningAsTestRunner = |
- path.url.basename(Platform.script.path).startsWith('runInIsolate.dart'); |
+/// The test runner starts all tests from a `data:` URI. |
+final bool runningAsTestRunner = Platform.script.scheme == 'data'; |
/// Whether the current process is a pub subprocess being run from a test. |
/// |