removeAllRelatedUnitTestFiles method

void removeAllRelatedUnitTestFiles(
  1. String featureName,
  2. String pageName
)

Removes all related unit test files for a page

featureName - Feature name pageName - Page name

Implementation

void removeAllRelatedUnitTestFiles(String featureName, String pageName) {
  final testPath =
      join(current, 'features', featureName, 'test', '${pageName}_test');
  removeFile(join(testPath, 'mapper.dart'));
  removeDirectory(join(testPath, 'json'));
  removeDirectory(join(testPath, 'data'));
  removeDirectory(join(testPath, 'domain'));
  removeDirectory(join(testPath, 'presentation', 'bloc'));
}