bitovi / funcunit

A functional test suite based on jQuery
https://funcunit.com/
MIT License
569 stars 378 forks source link

Do not set window.jQuery #187

Closed mickmcgrath13 closed 7 years ago

mickmcgrath13 commented 7 years ago

The jquery imported calls noConflict which cleans up global $ and jQuery. This file then puts the old version of jQuery back on window.jQuery

So if you are using jquery plugins that pass window.jQuery into an IIFE you will be using the FuncUnit version of jQuery in the plugin but a newer version in Can (and your tests)

Proposed solution – Remove this line: https://github.com/bitovi/funcunit/blob/master/browser/init.js#L4

window.jQuery = jQuery;
matthewp commented 7 years ago

LGTM, just need a different entry point for the global build, create a global.js that imports FuncUnit's main and then sets window.jQuery = jQuery.

jeroencornelissen commented 7 years ago

+1 We have a simular issue when importing jquery-ui.