stageFile function

Future<void> stageFile(
  1. Directory testDir,
  2. String fileName
)

Commit the file with a name in the test directory

Implementation

Future<void> stageFile(Directory testDir, String fileName) async {
  final result = await Process.run('git', [
    'add',
    fileName,
  ], workingDirectory: testDir.path);

  _throw('Could not stage $fileName', result);
}