Add assertThrows test helper
Webpack still depends on assert 1.5.0, while assert 2.0.0 has much more useful features, including support for Error instances and other objects in assert.throws
. This MR backports this to allows us to test for more than just an exception message: we can just compare error instances, or compare any property of an error instance.
This can later help implementing more specific error types to make debugging or error handling easier.
Edited by Erwan Rouchet