New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests: Allow Karma to load unminfied source #4128
Tests: Allow Karma to load unminfied source #4128
Conversation
@gibson042 The |
@timmywil That was surprisingly tricky to address, but should be good to go now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AMD mode doesn't seem to work. For example, choosing the support
module and enabling AMD mode leads to an all-red outcome. Moreover, most modules are not available under the dropdown when the AMD mode is selected. Pressing "Rerun" on a specific test doesn't fire tests just for it but also for many others, etc.
test/data/testinit.js
Outdated
// except when running tests in Karma (See Gruntfile) | ||
// Tests are always loaded async | ||
// except when running tests in Karma (See Gruntfile) | ||
if ( !window.__karma__ ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A double space incorrectly got inserted after __karma__
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
782e643
to
22d3349
Compare
Right, AMD behavior is at odds with the way the tests are currently loaded in Karma. I just removed that mode, because it doesn't provide much value over e.g. |
What do you mean by that? |
I typed the wrong example command, and looking back it wasn't really coherent anyway. Please disregard. However, we still don't have AMD mode in Karma, and I'm disinclined to force that in scope for this PR (there's no loss, since current master lacks both AMD and unminified). Someone else can make those changes later if they so desire. |
I agree, adding AMD support is a separate feature request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! A really nice improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Makes Karma behave more like the old tests by exposing a "load unminified" checkbox.
Checklist
If needed, a docs issue/PR was created at https://github.com/jquery/api.jquery.com