test.prototype.start = function()

in 2020/functional/functionalTest.js [1201:1223]


  test.prototype.start = function(runner) {
    try {
      if (undefined == navigator.mediaDevices.enumerateDevices) {
        throw Error('enumerateDevices does not exists!');
      }
      navigator.mediaDevices.enumerateDevices().then(function(listOfDevices) {
        for (var device of listOfDevices) {
          if (undefined == device.kind) {
            throw Error('kind does not exists!');
          }
          if (undefined == device.label) {
            throw Error('label does not exists!');
          }
          if (device.kind == "audioinput") {
            return runner.succeed();
          }
        }
        throw Error('No audioinput found!');
      });
    } catch (e) {
      return runner.fail(e);
    }
  };