Support loading of jasmine more than once during a page load #249

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@coli

coli commented Jul 5, 2012

Hi, this prabably doesn't handle the commonJS case correctly.

But this is the change I've made to support loading jasmin.js more than once for a single page.

This fixes the issue where jasmine goes into an infinite loop on the timeout methods
pivotal#247

To reproduce, have a page with something like

<script src="jasmine.js"> <script src="jasmine.js">
@infews

This comment has been minimized.

Show comment Hide comment
@infews

infews Jul 7, 2012

Contributor

If you use jasmine.getGlobal() instead of window, you'd solve the non-browser case. But do you have a spec to show this failing/passing?

Contributor

infews commented Jul 7, 2012

If you use jasmine.getGlobal() instead of window, you'd solve the non-browser case. But do you have a spec to show this failing/passing?

@infews infews closed this Jul 7, 2012

@infews infews reopened this Jul 7, 2012

@infews

This comment has been minimized.

Show comment Hide comment
@infews

infews Jul 7, 2012

Contributor

(sorry for the accidental close)

Contributor

infews commented Jul 7, 2012

(sorry for the accidental close)

@coli

This comment has been minimized.

Show comment Hide comment
@coli

coli Jul 9, 2012

Hi, the spec would have to load jasmine.js twice, then call setTimeout, and it'd get a max stack exceeded error in the console, not sure how to write one...

coli commented Jul 9, 2012

Hi, the spec would have to load jasmine.js twice, then call setTimeout, and it'd get a max stack exceeded error in the console, not sure how to write one...

@infews infews closed this May 27, 2013

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