It looks like
sinon.mock only stubs methods that are
hasOwnProperty of the object you are passing it;
ServerResponse.writeHead is implemented on prototype. So that its methods are not directly mocked.
An option is to create a mock object that implements
end, spy on those methods and make assertions on it. This would be a much more manual process in creating the mocked object...