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

hypothesis / h / 5701 / 1
55%
master: 97%

Build:
Build:
LAST BUILD BRANCH: realtime-update-v1-h-only-1
DEFAULT BRANCH: master
Ran 31 Mar 2015 01:12PM UTC
Files 60
Run time 2s
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

31 Mar 2015 12:51PM UTC coverage: 54.724%. First build
BROWSERIFY_PIPE_BIN=bin/browserify-pipe

push

travis-ci

seanh
Simplify auth-controller-test.coffee

- Remove variables $scope, $timeout, auth, session and controller that were
initialized in beforeEach() functions and shared between tests.

- Instead add a factory function (_controller()) that creates and returns
these variables, have each test that needs them call it to get just the
ones it needs.

- Remove the beforeEach() that was $providing a bunch of variables to the
Angular injector, it's not needed anymore.

- We don't need $provide() at all anymore, and we use inject() only to inject
$rootScope and $controller (which I think is unavoidable). This helps to
decouple our tests from Angular and make them easier to follow, without
having to understand the Angular injector.

- Only set the session spy in tests that need it

This decouples the tests from each other by removing shared variables and
shared beforeEach() behavior, making it easier to modify tests or add new
tests without affecting existing tests.

If a test doesn't need a particular variable, fixture or piece of setup code -
it just doesn't call it (also saves CPU cycles).

It also makes the tests easier to read - each test can be more easily
understood by just looking at its own code, without having to understand how
a bunch of global variables are created by Angular providing and injecting.
Each test function declares all the variable names that it uses inside its
own function code.

1367 of 2498 relevant lines covered (54.72%)

0.55 hits per line

Source Files on job 5701.1 (BROWSERIFY_PIPE_BIN=bin/browserify-pipe)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 5701
  • Travis Job 5701.1
  • c0cf346b on github
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