parseFile static method
Loads a test file from disk.
Implementation
static Future<EnsembleTestCase> parseFile(
String path, {
Map<String, dynamic> inputs = const {},
Map<String, dynamic> scenario = const {},
String? scenarioId,
}) async {
final file = File(path);
if (!await file.exists()) {
throw EnsembleTestFailure('Test file not found: $path');
}
return parseString(
await file.readAsString(),
sourcePath: path,
inputs: inputs,
scenario: scenario,
scenarioId: scenarioId,
);
}