import * as moq from "typemoq" ; import { Keys , KeySet } from "../../presentation-common" ; const deepEqual = require ( "deep-equal" ) ; internal export const configureForPromiseResult = < T > ( mock ) : void => { mock . setup ( ( x ) => x . then ) . returns ( ( ) => undefined ) ; } ; internal export const isKeySet = ( expectedKeys ) => { const expected = new KeySet ( expectedKeys ) ; return moq . It . is < KeySet > ( ( actual ) => ( actual . size === expected . size && actual . hasAll ( expected ) ) ) ; } ; internal export const deepEquals = < T > ( expected ) => { return moq . It . is ( ( actual ) => deepEqual ( actual , expected ) ) ; } ;