UNPKG

@fakes/media-devices

Version:

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

14 lines (13 loc) 415 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); expect.extend({ toIncludeVideoTrack(received) { const videoTracks = received.getTracks().filter((track) => track.kind === 'video'); const pass = videoTracks.length > 0; const message = () => (pass ? '' : `includes no video track`); return { message, pass, }; }, });