Slight refactoring and tests #1

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
@napcs

napcs commented Jan 3, 2013

Uses Jasmine and a spy to ensure the callback is only executed when
the browser is in compatibility mode. The logic for determining
compatibility mode is wrapped in a function so it can be stubbed out in
tests.

Feel free to use this, or discard it. I mostly did this for fun because I wanted to see how hard it would be to test jquery plugins. :)

Adds tests and slight refactoring to the code
Uses Jasmine and a spy to ensure the callback is only executed when
the browser is in compatibility mode. The logic for determining
compatibility mode is wrapped in a function so it can be stubbed out in
tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment