Fix unittest to watch for events. Now all tests just wait on promises that resolve when we see all the events we expect.