load method

  1. @override
Future<RunnerSuite?> load(
  1. String path,
  2. SuitePlatform platform,
  3. SuiteConfiguration suiteConfig,
  4. Map<String, Object?> message,
)

Loads the runner suite for the test file at path using platform, with suiteConfig encoding the suite-specific configuration.

By default, this just calls loadChannel and passes its result to deserializeSuite. However, it can be overridden to provide more fine-grained control over the RunnerSuite, including providing a custom implementation of Environment.

Subclasses overriding this method must call deserializeSuite in platform_helpers.dart to obtain a RunnerSuiteController. They must pass the opaque message parameter to the deserializeSuite call.

Implementation

@override
Future<RunnerSuite?> load(String path, SuitePlatform platform,
    SuiteConfiguration suiteConfig, Map<String, Object?> message) async {
  print('** Compiling test...');

  var prevWorkingDir = Directory.current;

  var bonesUICompileDir = bonesUICompiler.compileDir;

  Directory.current = bonesUICompileDir;

  var runnerSuite =
      await browserPlatform.load(path, platform, suiteConfig, message);

  Directory.current = prevWorkingDir;

  return runnerSuite;
}