gast
gast copied to clipboard
t.throws(fn) does not catch the exception thrown
t.throws(fn)
does not catch the exception thrown, making the test function to fail.
Here's how to reproduce the problem:
if ((typeof GasTap)==='undefined') {
eval(UrlFetchApp.fetch('https://raw.githubusercontent.com/zixia/gast/master/src/gas-tap-lib.js').getContentText())
}
var test = new GasTap()
function gastTestRunner() {
test('do calculation right', function (t) {
t.throws(UrlFetchApp.fetch("hi"));
})
}
Hi,
Did you find the reason that caused this problem?
A Pull Request to fix this will be very welcome, and thanks for the reporting!
To be quite frank, I don't really remember what happened with this, but I think I probably stopped using gast altogether.
That's ok. I was doing housekeeping today and found some missed issues here and there.
Have a good day!