]> source.dussan.org Git - jquery.git/commit
Core: Test all factory use cases from intro.js
authorMichał Gołębiowski <m.goleb@gmail.com>
Sun, 26 Apr 2015 17:33:05 +0000 (19:33 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Mon, 27 Apr 2015 20:44:47 +0000 (22:44 +0200)
commitab407258795bfa05756b009058757f8b42aa9c53
treef96c0057a86c7d53deae69dd442ae55311263ee8
parentff18d8e2060ae7c15c7694dc6bcbbeb9cbfbdaa4
Core: Test all factory use cases from intro.js

There is a lot of logic in intro.js; now we test four cases:
1. (implicitly, via QUnit tests) A real browser with window being the global
2. Browserify where there are both global & window variables.
3. Node with jsdom where window is passed manually to the jQuery factory.
4. Pure Node with incorrect window passed; jQuery should throw then.

Previously the second & fourth case was not tested and the third was tested
in a way that interfered with the main test environment.

We now also test if in the Browserify case we're not creating a jQuery global
by default.

Fixes gh-2181
Closes gh-2234
14 files changed:
Gruntfile.js
build/tasks/lib/spawn_test.js [new file with mode: 0644]
build/tasks/node_smoke_test.js [deleted file]
build/tasks/node_smoke_tests.js [new file with mode: 0644]
build/tasks/promises-aplus-tests.js [deleted file]
build/tasks/promises_aplus_tests.js [new file with mode: 0644]
package.json
test/node_smoke_tests/document_missing.js [new file with mode: 0644]
test/node_smoke_tests/document_passed.js [new file with mode: 0644]
test/node_smoke_tests/document_present_originally.js [new file with mode: 0644]
test/node_smoke_tests/lib/ensure_global_not_created.js [new file with mode: 0644]
test/node_smoke_tests/lib/ensure_jquery.js [new file with mode: 0644]
test/promises-aplus-adapter.js [deleted file]
test/promises_aplus_adapter.js [new file with mode: 0644]