SnapshotTestOptions.defaultOptions constructor

SnapshotTestOptions.defaultOptions({
  1. String? projectPath,
  2. String? snapshotDirPath,
  3. String? testsDirPath,
  4. String? driverDirPath,
  5. bool? forceCaptureMode,
  6. bool? releaseMode,
})

Implementation

factory SnapshotTestOptions.defaultOptions(
    {String? projectPath,
    String? snapshotDirPath,
    String? testsDirPath,
    String? driverDirPath,
    bool? forceCaptureMode,
    bool? releaseMode}) {
  final projectDir = projectPath ?? Directory.current.path;
  return SnapshotTestOptions(
    snapshotDirPath: snapshotDirPath ?? '$projectDir/fest/snapshots',
    testsDirPath: testsDirPath ?? '$projectDir/integration_tests',
    driverDirPath:
        driverDirPath ?? '$projectDir/integration_tests/test_driver',
    forceCaptureMode: forceCaptureMode ?? false,
  );
}