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

cjolowicz / muckr-web / 32
100%

Build:
DEFAULT BRANCH: master
Ran 13 Jan 2019 04:21PM UTC
Jobs 1
Files 10
Run time 3s
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
32

push

travis-ci

cjolowicz
Add snapshot tests for App

This commit adds snapshot tests for both routes in the App, using
`MemoryRouter` to invoke specific routes via the `initialEntries`
prop.

We provide an `AppWithoutRouter` component, which is identical to
`App` except that it is not wrapped by `BrowserRouter`. This is
required because the component cannot be wrapped by both
`BrowserRouter` and `MemoryRouter` at the same time.

Snapshot tests fail when `initialEntries` contains only an array of
pathnames. This is due to randomly generated keys being used at each
test invocation. To avoid this, we provide a fixed `key` to
`MemoryRouter` entries. The technique is described here:

  https://github.com/ReactTraining/react-router/issues/5579#issuecomment-333401692

An alternative technique sets the `keyLength` attribute of router
entries to zero.

The snapshot test for the default route uses `App` instead of
`AppWithoutRouter` in order to provide full test coverage for the
module.

25 of 25 branches covered (100.0%)

Branch coverage included in aggregate %.

85 of 85 relevant lines covered (100.0%)

6.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32.1 13 Jan 2019 04:21PM UTC 0
100.0
Travis Job 32.1
Source Files on build 32
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #32
  • a70b712b on github
  • Prev Build on master (#31)
  • Next Build on master (#32)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc