Skip to content

Commit

Permalink
Merge pull request #46 from zspencer/ensure-ewww-side-effects-has-acc…
Browse files Browse the repository at this point in the history
…ess-to-the-lazily-loaded-jquery

prevent load-order bugs where jQuery is loaded after jasmine-fixture
  • Loading branch information
searls committed Nov 22, 2015
2 parents 688c26f + f32917e commit 1d4061b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/js/jasmine-fixture.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@
else
$('<div id="jasmine_content"></div>').appendTo('body')

ewwSideEffects = (jasmineFixture) ->
root.jasmine?.fixture = jasmineFixture
$.fn.affix = root.affix = jasmineFixture.affix
afterEach ->
$('#jasmine_content').remove()

jasmineFixture = {affix, create, noConflict}
ewwSideEffects(jasmineFixture)
return jasmineFixture

ewwSideEffects = (jasmineFixture) ->
root.jasmine?.fixture = jasmineFixture
$.fn.affix = root.affix = jasmineFixture.affix
afterEach ->
$('#jasmine_content').remove()

if $
jasmineFixture = root.jasmineFixture($)
Expand Down

0 comments on commit 1d4061b

Please sign in to comment.