nit: for this if block, because we don't call done, we can't use the `done(function)` shortcut. Still it could be nice to put everything in a try/catch; and in the catch call done (in case there is an error):
```javascript
if (actionMsg === ...) {
  try {
    assert...
    ...
    postMessage
  } catch(e) {
    done(e)
  }
}
```

If you prefer, you can put the whole function in a try/catch block, and not use the `done(function)` shortcut. Maybe it's more readable, up to you.