UNPKG

@fakes/media-devices

Version:

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

13 lines (10 loc) 409 B
import { NotImplemented, ThrowingNotImplemented } from './not-implemented' import { DefaultReporter, Reporter } from './reporter' export const defaultContext = (): Context => { const reporter = new DefaultReporter() return { notImplemented: new ThrowingNotImplemented(reporter), reporter: reporter } } export interface Context { readonly notImplemented: NotImplemented readonly reporter: Reporter }