runTests method

void runTests(
  1. String fileName,
  2. bool record
)

Implementation

void runTests(String fileName, bool record) {
  final rp = Completer();
  if (record) {
    Process.run('xcrun',
        ['simctl', 'io', 'booted', 'recordVideo', '--codec=h264', ' ']);
    rp.future;
    ProcessSignal.sigint.watch().listen((signal) {
      rp.complete('Movie recording completed');
    });
  }
  run('flutter', ['test', '-d', _id, '--pub', fileName]);
  if (record) {
    rp.complete('Movie recording completed');
  }
}