UNPKG

@fakes/media-devices

Version:

A interactive fake implementation of MediaDevices interface in the browser for testing

24 lines (23 loc) 558 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Deferred = void 0; class Deferred { constructor() { this._resolve = () => { }; this._reject = () => { }; this._promise = new Promise((resolve, reject) => { this._reject = reject; this._resolve = resolve; }); } get promise() { return this._promise; } resolve(value) { this._resolve(value); } reject(value) { this._reject(value); } } exports.Deferred = Deferred;