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

hypothesis / h / 5701
55%
master: 97%

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

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

Jobs
ID Job ID Ran Files Coverage
1 5701.1 (BROWSERIFY_PIPE_BIN=bin/browserify-pipe) 31 Mar 2015 01:12PM UTC 0
54.72
Travis Job 5701.1
Source Files on build 5701
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5701
  • 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