Unit testing of postmessage client module