[BUGFIX beta] Guard jQuery access in `setupForTesting`. #15065

Merged
merged 1 commit into from Mar 24, 2017

Conversation

Projects
None yet
2 participants
@rwjblue
Member

rwjblue commented Mar 24, 2017

Begins addressing #15063.

@@ -35,11 +35,13 @@ export default function setupForTesting() {
setAdapter((typeof self.QUnit === 'undefined') ? new Adapter() : new QUnitAdapter());
}
- jQuery(document).off('ajaxSend', incrementPendingRequests);
- jQuery(document).off('ajaxComplete', decrementPendingRequests);
+ if (jQuery) {

This comment has been minimized.

@cibernox

cibernox Mar 24, 2017

Contributor

can you do import { jQuery } from 'ember-views'; if there is no jquery? What does that import?

@cibernox

cibernox Mar 24, 2017

Contributor

can you do import { jQuery } from 'ember-views'; if there is no jquery? What does that import?

This comment has been minimized.

@rwjblue

rwjblue Mar 24, 2017

Member

@cibernox - Yes, it exports undefined in that case you can see (from here) that it basically does:

let jQuery

export default jQuery
@rwjblue

rwjblue Mar 24, 2017

Member

@cibernox - Yes, it exports undefined in that case you can see (from here) that it basically does:

let jQuery

export default jQuery

@rwjblue rwjblue merged commit 5506aba into master Mar 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rwjblue rwjblue deleted the guard-jquery-access branch Mar 24, 2017

@cibernox cibernox referenced this pull request in cibernox/ember-native-dom-helpers Mar 26, 2017

Merged

Attempt to run acceptance tests without jquery using ember canary #48

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