zulip/frontend_tests/zjsunit
Steve Howell 9943a07e8c node tests: Improve handling of blueslip.fatal().
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.
2020-04-08 11:37:27 -04:00
..
bugdown_assert.js text: Fix some typos (most of them found and fixed by codespell). 2020-03-27 17:25:56 -07:00
finder.js js: Convert a.indexOf(…) !== -1 to a.includes(…). 2020-02-10 14:08:12 -08:00
handlebars.js tests: Compile Handlebars templates with source maps. 2020-02-18 07:38:46 -05:00
i18n.js js: Convert _.map(a, …) to a.map(…). 2020-02-10 14:08:12 -08:00
index.js node tests: Auto-include zblueslip for node tests. 2020-04-03 12:56:49 -04:00
mdiff.js js: Convert _.has to Object.prototype.hasOwnProperty. 2020-02-25 14:09:39 -08:00
namespace.js zjsunit: Clear namespace more aggressively. 2020-02-27 10:21:36 -05:00
stub.js js: Automatically convert _.each to for…of. 2020-02-07 14:09:47 -08:00
zblueslip.js node tests: Improve handling of blueslip.fatal(). 2020-04-08 11:37:27 -04:00
zjquery.js js: Convert $.extend to spread syntax. 2020-02-25 14:09:39 -08:00