Allow Jasmine adapter to work without $yetify #1

Merged
merged 2 commits into from Jun 6, 2012

2 participants

@webxl

There's also a commit that fixed an error generated by a jasmine waitsFor test, that I might not have been handling properly, but at least the fix prevents an 'Uncaught TypeError' in those situations.

Matt Motherway added some commits Jun 5, 2012
Matt Motherway Check existence of $yetify to allow this adapter to work in a standal…
…one jasmine page.
f56a1bc
Matt Motherway fixed "✖ Script error: Uncaught TypeError: Cannot read property 'pass…
…ed_' of undefined" for jasmine test. Probably caused by mock ajax plugin or waitsFor test timeout.
44346eb
@webxl

I just realized the same thing can be achieved when doing the hookup:

if (window.$yetify !== undefined) {
    BUNYIP.hookup(jasmineEnv);
}

Feel free to exclude that check in the request. Perhaps this should be documented, though

@ryanseddon ryanseddon merged commit 5aa2c00 into ryanseddon:master Jun 6, 2012
@ryanseddon
Owner

Awesome thanks @webxl! I'll update the jasmine readme to suggest wrapping the hookup call in a $yetify check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment