import invariant from 'invariant' ; import { DeltaChangeContext } from '@delta/DeltaChangeContext' ; import { Selection } from '@delta/Selection' ; export function mockDeltaChangeContext ( beforeStart , afterStart , beforeEnd ? ) { invariant ( beforeEnd === undefined || beforeEnd > beforeStart , '' ) ; return new DeltaChangeContext ( Selection . fromBounds ( beforeStart , beforeEnd ) , Selection . fromBounds ( afterStart ) ) ; } export function mockSelection ( start , end ? ) { return Selection . fromBounds ( start , end ) ; }