• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zulip / zulip-mobile / 6842
47%

Build:
DEFAULT BRANCH: master
Ran 12 Sep 2018 04:25AM UTC
Jobs 1
Files 363
Run time 24s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
6842

push

travis-ci

gnprice
stream: Eliminate NULL_STREAM.

See reasoning on the recent similar commit for NULL_MESSAGE.

In `getStreamFromId`, there's no sensible default value and the
right behavior depends on the caller's needs.  It turns out that
every call site is a line just like this, in a `connect` call:

  stream: getStreamFromId(props.navigation.state.params.streamId)(state),

In that situation, on the one hand there's nothing we can do that
will avoid the screen looking quite broken; and on the other, for us
to get here with a stream ID that doesn't belong to any stream we
actually know about should be a highly avoidable kind of programming
error.

Moreover, checking the call sites of each navigation action creator
that passes a stream ID in the nav state (thanks, VS Code, for making
that efficient -- Shift-F12 on each one in turn, in navActions.js),
the argument in every one of them looks like `stream.stream_id`, which
should mean we don't currently have this highly avoidable kind of bug.

So, just throw an exception.

(There was a time that we used this function's default return value as
the default values when creating a stream, so that the way to change
those defaults was to edit NULL_STREAM -- yikes!  See 94ce54dba.
Fortunately we fixed that soon after, in f9085d3f7.)

If we had some facility for rendering an "oops!" screen on error,
this would be a good place to use it just to be sure, even though
the risk is low.

1016 of 2113 branches covered (48.08%)

Branch coverage included in aggregate %.

1967 of 3814 relevant lines covered (51.57%)

43.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6842.1 (COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv) 12 Sep 2018 04:25AM UTC 0
50.33
Travis Job 6842.1
Source Files on build 6842
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #6842
  • e22596c2 on github
  • Prev Build on master (#6839)
  • Next Build on master (#6843)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc