mirror of https://github.com/zulip/zulip.git
9943a07e8c
We now use `assert.throws()` to test that we're properly calling `blueslip.fatal`. In order to not break line coverage here, we have to remove an unreachable `return` in `stream_data.js`. Usually we test `fatal` for line coverage reasons. Most places where we use `blueslip.fatal` fall in these categories: * the code is theoretically unreachable, but we have `blueslip.fatal` for defensive reasons * we have some upstream bug that we should just fix * the code should recover gracefully and just use blueslip.errors() It's possible that we should eliminate `blueslip.fatal` from our API and just throw errors when really important invariants get broken. This will make it more obvious to somebody reading the code that we're not going to continue after the call, and `blueslip` already knows how to catch exceptions and report them. |
||
---|---|---|
.. | ||
bugdown_assert.js | ||
finder.js | ||
handlebars.js | ||
i18n.js | ||
index.js | ||
mdiff.js | ||
namespace.js | ||
stub.js | ||
zblueslip.js | ||
zjquery.js |