change method
Configuration
change({
- bool? help,
- String? customHtmlTemplatePath,
- bool? version,
- bool? pauseAfterLoad,
- bool? debug,
- bool? color,
- String? configurationPath,
- String? reporter,
- Map<
String, String> ? fileReporters, - String? coverage,
- int? concurrency,
- int? shardIndex,
- int? totalShards,
- Map<
String, Set< ? testSelections,TestSelection> > - Iterable<
String> ? exceptPackages, - Iterable<
String> ? onlyPackages, - Glob? filename,
- Iterable<
String> ? chosenPresets, - Map<
String, Configuration> ? presets, - Map<
String, RuntimeSettings> ? overrideRuntimes, - Map<
String, CustomRuntime> ? defineRuntimes, - bool? noRetry,
- int? testRandomizeOrderingSeed,
- bool? ignoreTimeouts,
- bool? allowDuplicateTestNames,
- bool? jsTrace,
- bool? runSkipped,
- Iterable<
String> ? dart2jsArgs, - String? precompiledPath,
- Iterable<
RuntimeSelection> ? runtimes, - BooleanSelector? includeTags,
- BooleanSelector? excludeTags,
- Map<
BooleanSelector, SuiteConfiguration> ? tags, - Map<
PlatformSelector, SuiteConfiguration> ? onPlatform, - Timeout? timeout,
- bool? verboseTrace,
- bool? chainStackTraces,
- bool? skip,
- String? skipReason,
- PlatformSelector? testOn,
- Iterable<
String> ? addTags,
Returns a copy of this configuration with the given fields updated.
Note that unlike merge, this has no merging behavior—the old value is always replaced by the new one.
Implementation
Configuration change(
{bool? help,
String? customHtmlTemplatePath,
bool? version,
bool? pauseAfterLoad,
bool? debug,
bool? color,
String? configurationPath,
String? reporter,
Map<String, String>? fileReporters,
String? coverage,
int? concurrency,
int? shardIndex,
int? totalShards,
Map<String, Set<TestSelection>>? testSelections,
Iterable<String>? exceptPackages,
Iterable<String>? onlyPackages,
Glob? filename,
Iterable<String>? chosenPresets,
Map<String, Configuration>? presets,
Map<String, RuntimeSettings>? overrideRuntimes,
Map<String, CustomRuntime>? defineRuntimes,
bool? noRetry,
int? testRandomizeOrderingSeed,
bool? ignoreTimeouts,
// Suite-level configuration
bool? allowDuplicateTestNames,
bool? jsTrace,
bool? runSkipped,
Iterable<String>? dart2jsArgs,
String? precompiledPath,
Iterable<RuntimeSelection>? runtimes,
BooleanSelector? includeTags,
BooleanSelector? excludeTags,
Map<BooleanSelector, SuiteConfiguration>? tags,
Map<PlatformSelector, SuiteConfiguration>? onPlatform,
// Test-level configuration
Timeout? timeout,
bool? verboseTrace,
bool? chainStackTraces,
bool? skip,
String? skipReason,
PlatformSelector? testOn,
Iterable<String>? addTags}) {
var config = Configuration._(
help: help ?? _help,
customHtmlTemplatePath:
customHtmlTemplatePath ?? this.customHtmlTemplatePath,
version: version ?? _version,
pauseAfterLoad: pauseAfterLoad ?? _pauseAfterLoad,
debug: debug ?? _debug,
color: color ?? _color,
configurationPath: configurationPath ?? _configurationPath,
reporter: reporter ?? _reporter,
fileReporters: fileReporters ?? this.fileReporters,
coverage: coverage ?? this.coverage,
concurrency: concurrency ?? _concurrency,
shardIndex: shardIndex ?? this.shardIndex,
totalShards: totalShards ?? this.totalShards,
testSelections: testSelections ?? _testSelections,
foldTraceExcept: exceptPackages ?? _foldTraceExcept,
foldTraceOnly: onlyPackages ?? _foldTraceOnly,
filename: filename ?? _filename,
chosenPresets: chosenPresets ?? this.chosenPresets,
presets: presets ?? this.presets,
overrideRuntimes: overrideRuntimes ?? this.overrideRuntimes,
defineRuntimes: defineRuntimes ?? this.defineRuntimes,
noRetry: noRetry ?? _noRetry,
testRandomizeOrderingSeed:
testRandomizeOrderingSeed ?? this.testRandomizeOrderingSeed,
stopOnFirstFailure: _stopOnFirstFailure,
includeTags: includeTags,
excludeTags: excludeTags,
globalPatterns: globalPatterns,
suiteDefaults: suiteDefaults.change(
allowDuplicateTestNames: allowDuplicateTestNames,
jsTrace: jsTrace,
runSkipped: runSkipped,
dart2jsArgs: dart2jsArgs,
precompiledPath: precompiledPath,
runtimes: runtimes,
tags: tags,
onPlatform: onPlatform,
timeout: timeout,
verboseTrace: verboseTrace,
chainStackTraces: chainStackTraces,
skip: skip,
skipReason: skipReason,
testOn: testOn,
addTags: addTags,
ignoreTimeouts: ignoreTimeouts,
));
return config._resolvePresets();
}