TestTimerRewritePlan.forApp constructor

TestTimerRewritePlan.forApp({
  1. required String appDir,
  2. required String? testsDirRelative,
})

Implementation

factory TestTimerRewritePlan.forApp({
  required String appDir,
  required String? testsDirRelative,
}) {
  if (testsDirRelative != null) {
    TestEntryValidator.validatePathWithinRoot(
      root: appDir,
      relativePath: testsDirRelative,
    );
  }
  final testsDirPath =
      testsDirRelative == null ? null : p.join(appDir, testsDirRelative);
  return TestTimerRewritePlan(
    testsDirRelative: testsDirRelative,
    config: TestTimerRewriter.readConfig(testsDirPath),
  );
}