Skip to content

Instantly share code, notes, and snippets.

@abarth
Created February 19, 2016 22:10
Show Gist options
  • Save abarth/eaaa3fada9b3b1acf9fb to your computer and use it in GitHub Desktop.
Save abarth/eaaa3fada9b3b1acf9fb to your computer and use it in GitHub Desktop.
package:test loading hack
diff --git a/lib/src/runner/loader.dart b/lib/src/runner/loader.dart
index cd08026..46842d8 100644
--- a/lib/src/runner/loader.dart
+++ b/lib/src/runner/loader.dart
@@ -24,6 +24,8 @@ import 'plugin/platform.dart';
import 'runner_suite.dart';
import 'vm/platform.dart';
+var createVMPlatform = (Configuration config) => new VMPlatform(config);
+
/// A class for finding test files and loading them into a runnable form.
class Loader {
/// The test runner configuration.
@@ -49,7 +51,7 @@ class Loader {
/// defaults to the working directory.
Loader(this._config, {String root})
: _root = root == null ? p.current : root {
- registerPlatformPlugin([TestPlatform.vm], () => new VMPlatform(_config));
+ registerPlatformPlugin([TestPlatform.vm], () => createVMPlatform(_config));
registerPlatformPlugin([
TestPlatform.dartium,
TestPlatform.contentShell,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment