Commit Graph

132 Commits

Author SHA1 Message Date
Timmy Willison
3654bc831d
Tests: update npo.js and include unminified source instead
Close gh-4446
Ref gh-4445
2019-08-12 12:14:58 -04:00
Michał Gołębiowski-Owczarek
0ec25abba2
Build: Run the basic test suite in jsdom
The basic test suite is now run in jsdom on all supported Node.js versions
(8, 10 & 11 as of now).

Closes gh-4310
2019-03-11 20:03:54 +01:00
Michał Gołębiowski-Owczarek
6ced2639b5
Build: Update QUnit from 1.23.1 to 2.9.2
Closes gh-4307
2019-03-04 20:10:21 +01:00
Michał Gołębiowski-Owczarek
9cb124ed00
Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test
So far, we've been testing that jQuery element iteration works with polyfilled
Symbol & transpiled for-of via a Node test with jsdom with the Symbol global
removed. Unfortunately, jsdom now requires Symbol to be present for its internal
functionality so such a test is no longer possible. Instead, it's been migrated
to an iframe test with transpiled JavaScript.

This PR also enables us to use ECMAScript 2017 or newer in Node.js code.

Closes gh-4305
2019-03-04 18:30:51 +01:00
abnud1
8751e9ef86 Build: Update most dependencies
The only packages not fully updated are:
- qunitjs & karma-qunit as that's a QUnit 2.x update that will require some
changes and we'll do that later
- jsdom as we need to first rewrite the test with the Symbol polyfill - newer
jsdom versions don't work with such a hacked Symbol instance
- sinon as the v2 -> v7 upgrade requires to update our unit tests
- uglify-js & grunt-contrib-uglify as latest uglify-js versions slightly worsen
the minified gzipped size

Closes gh-4227
Closes gh-4228
Closes gh-4230
Closes gh-4232
2019-02-19 13:05:09 +01:00
Timmy Willison
13d0be101f
Tests: add IE launcher for debugging IE11 on Windows 2018-11-27 14:28:57 -05:00
Richard Gibson
dfa92ccead
Tests: Allow Karma to load unminfied source
Closes gh-4128
2018-09-07 10:14:01 -04:00
Luis Emilio Velasco Sanchez
0ba8e38d0c Traversing: $.fn.contents() support for object
Fixes gh-4045
Closes gh-4046
2018-05-14 13:41:42 -04:00
Michał Gołębiowski-Owczarek
b95e0da68e
Build: Don't require sudo on Travis, use sandboxless headless Chrome
The Chrome sandbox doesn't work on Travis unless sudo is enabled. Instead,
we're disabling the Chrome sandbox.

Closes gh-4011
2018-03-19 18:12:23 +01:00
Oleg Gaydarenko
3652842404 Build: remove artefact from previous commit
Follow-up for 09684ba3f2
2018-03-07 11:33:39 +03:00
Oleg Gaydarenko
09684ba3f2 Build: Seasonal update of uglify and its options
raw     gz Compared to last run
 =      = dist/jquery.js
-294    -88 dist/jquery.min.js

Closes gh-3994
2018-03-05 20:53:57 +03:00
Timo Tijhof
7eec97aab3
Build: Add "-debug" suffix to name of karma debug tasks
Ref gh-3922
Close gh-3936
2018-01-17 11:04:38 -05:00
Timmy Willison
428ee4a624
Tests: correctly set sudo in travis config, not karma config 2018-01-16 11:17:33 -05:00
Timmy Willison
46ea7a3f0e
Tests: temporarily require sudo access for karma:main on travis
- This should fix the broken travis build on Node 8
- See https://github.com/travis-ci/travis-ci/issues/8836
2018-01-16 11:11:01 -05:00
Timmy Willison
c9efd11f47
Build: Fix UglifyJS output in Android 4.0; update uglify
- Thanks to @mgol for first pass

Fixes gh-3743
Close gh-3920
2018-01-08 11:48:24 -05:00
Timo Tijhof
ecd8ddea33
Tests: Add support for running unit tests via grunt with karma
- Update QUnit to 1.23.1
- Remove unused dl#dl from test/index.html
- Remove unused map#imgmap from test/index.html
- Ensure all urls to data use baseURI
- Add the 'grunt karma:main' task
  - customContextFile & customDebugFile
- Add 'npm run jenkins' script

Close gh-3744
Fixes gh-1999
2017-12-18 12:27:38 -05:00
Henry Zhu
90bac40a51 Build: Update to Babel 7, use for-of plugin instead of preset-es2015
Closes gh-3786
2017-09-25 19:02:19 +02:00
Timmy Willison
0bf499ca24
Build: fix uglify options for uglify update
- Uses new typeofs option for compression
- See https://github.com/mishoo/UglifyJS2/issues/2198

Close gh-3710
2017-07-10 11:52:44 -04:00
Michał Gołębiowski
d10ac0e532 Build: Drop support for building on Node.js 0.12
Node.js 0.12 is no longer supported by upstream. So far we had to keep
a workaround that would skip running ESLint there (or even load its task)
as it no longer supports Node.js <4; the same applied to Node smoke tests
as jsdom has also dropped support for those old Node versions. Those
workarounds have been removed now.

Ref 030191ae32
Closes gh-3478
2016-12-30 13:54:59 +01:00
Michał Gołębiowski
cbc8638c38 Build: ESLint setup improvements
1. Use the short name of the preset in the config.
2. Run ESLint first on non-minified files.
3. Explicitly specify environments in every config file (those settings cascade
which means we've been assuming a Node.js environment where we shouldn't have).
2016-12-19 02:07:03 +01:00
Timmy Willison
7fbab88110
Build: jQuery Foundation -> JS Foundation
Close gh-3414
2016-12-05 11:54:38 -05:00
Michał Gołębiowski
5b4cb0d337 Build: Stop testing on Node.js 0.10
Node.js 0.10 loses upstream support today (see https://github.com/nodejs/LTS/)
so let's stop testing against it as well.
2016-10-31 18:38:35 +01:00
Oleg Gaidarenko
308e4b534b Build: Simplify Gruntfile constructions
Fixes gh-3246
2016-08-02 20:58:01 +03:00
Michał Gołębiowski
edf7a43681 Build: Don't lint every file in dist/ (#3245)
Currently the "all" target for the eslint task includes way more than
the "dev" & "dist" targets combined and those 2 tasks are the one run in
`npm test`.
2016-07-26 03:22:53 +04:00
Michał Gołębiowski
030191ae32 Build: Skip running ESLint on Node.js 0.x
ESLint 3.0 drops support for Node.js older than 4.x. To be able to update
to this version and yet not block our contributors from building jQuery
on older Node.js (at least until it's supported by upstream) this commit
makes ESLint skipped on older Node; a proper message is displayed then.

Fixes gh-3222
2016-07-13 10:54:34 +02:00
Oleg Gaidarenko
25d8ccd111 Build: Improve ESLint configuration (#3188)
* Bump eslint-config-jquery package to 0.1.4 version

* Add subtask "dist" to "eslint" task and add it to the build task list

* Make gitignore globs more flexible for the "dist" folder

Fixes gh-3169
2016-06-22 19:41:57 +04:00
Oleg Gaidarenko
58c6ca9822 Build: ESLint details
Use eslint pragmas, fix new errors, etc

Closes gh-3148
2016-06-11 10:41:33 +03:00
Oleg Gaidarenko
f80ae67c53 Build: Switch from jscs+jshint to eslint 2016-06-11 10:39:51 +03:00
Michał Gołębiowski
d3a781d762 Build: Don't lint the built file in the husky precommit hook
The husky Git precommit hook was linting not only the source but also the
built file. Normally it's expected, we want to run basic checks on what's
built but in the precommit hook we're not building the file so we might
be linting some previous, broken version.

Fixes gh-3091
2016-04-29 10:36:57 +02:00
Richard Gibson
cf1497a58c Build: A more modest block-level function proposal
This reverts commit fa610da684.
2016-04-23 22:14:25 -04:00
Michał Gołębiowski
fa610da684 Build: Workaround strict mode violations caused by UglifyJS
This commit increases the gzipped size by 90 bytes so a better solution
is needed but, at the same time, it disables the very optimizations
that are causing strict mode violations in Firefox 45, Safari 9 & IE 10.

Refs 76084372c2
Refs mishoo/UglifyJS2#1052
2016-04-23 20:30:00 +02:00
Timmy Willison
5cbb234dd3 Core: implement ready without Deferred
- Make jQuery.ready promise-compatible
- Gives up sync guarantee for post-ready callbacks

Fixes gh-1778
Fixes gh-1823
Close gh-2891
2016-04-04 11:26:22 -04:00
Michał Gołębiowski
c7431c7793 Build: Drop testing on jsdom with Node 0.10 & 0.12
Fixes gh-2841
2016-02-10 12:57:49 +01:00
Michał Gołębiowski
991e3f3e2a Build: Move the stripJSONComments variable to the function that uses it 2016-02-10 12:54:25 +01:00
Michał Gołębiowski
3f46cec169 Build: Stop removing the JSHint onevar option, it's no longer there 2016-02-09 10:18:19 +01:00
Jha Naman
d94c453979 Build: run linters on git-commit
Fixes gh-2577
Closes gh-2881
2016-01-29 02:34:55 +03:00
Michał Gołębiowski
67c96a59f5 Build: Update npm deps, fix Sinon npmcopy config
All deps were updated except:
 * jsdom - tests using a Symbol polyfill are hacky and break with newer jsdom;
   we need to re-do them properly first
 * qunitjs - versions 1.19.0 & 1.20.0 introduce race conditions to the tests,
   making the fail randomly

Those two packages will be updated once issues related to them get resolved.

Fixes gh-2877
2016-01-27 12:54:39 +01:00
Michał Gołębiowski
dda87f6b16 Build: enable JSCS for test/unit/support.js, fix styling issues 2016-01-27 12:14:17 +01:00
Timmy Willison
f5fb8d71cb Build: Encode non-ASCII as \uXXXX 2016-01-11 11:42:33 -05:00
Timmy Willison
cf7102c3f1 Release: push a custom slim build to the CDN
Fixes gh-2653
Close gh-2711
2015-11-16 11:22:20 -05:00
Dave Methvin
1144e754a6 Build: Add "deprecated" to the Testswarm module list
Ref #1740

Yeah.
2015-10-20 12:30:01 -04:00
Dave Methvin
67d7a2eefe CSS: Make show/hide/toggle methods a module
Unit test changes some uses of .show() and .hide() to .css( "display", ... ),
there was already an implicit assumption in several of the existing tests.

Fixes gh-2193
Close gh-2648
2015-10-18 12:30:00 -04:00
Michał Gołębiowski
2c7e9c9349 Tests: Add simple tests for Android 2.3
Fixes gh-2505
Closes gh-2509
Refs gh-2483
2015-09-08 18:03:49 +02:00
Michał Gołębiowski
dbb2daa8c3 Build: Don't install jsdom 3 on Node.js 0.10 & 0.12 by default
jsdom 3 requires Python & Visual Studio on Windows which is a significant
barrier to contributors. Newer jsdom versions don't require pre-compiling
but work only on io.js. This commit installs the new jsdom everywhere (it
does install in old Node.js, it just won't work) and executes Node-related
tests only on newer Nodes or if a working jsdom version is installed. The
latter can be achieved by running the `old_jsdom` task.

Node.js is merging with io.js soon so this will become a smaller problem over
time.

One drawback is our Jenkins setup runs on Node 0.10 so it won't be running
Node tests anymore. We have Travis set up on io.js, though so all PRs
have those tests run. When the new LTS Node.js arrives (as it soon merges
with io.js) we should update our Jenkins infrastructure so that it runs on this
new version.

Fixes gh-2519
Closes gh-2526
2015-09-08 17:42:38 +02:00
Thomas Tortorini
3dd3d1357d Effects: Finish should call progress
Fixes gh-2283
Closes gh-2292
2015-09-08 02:40:54 +02:00
Oleg Gaidarenko
5adf04a73c Build: put back "lint" command to the "dev" list
Also fix lint error in `data` module.

It seems this command was removed from the list during merge
2015-09-08 02:33:43 +03:00
Oleg Gaidarenko
99975c44ab Build: correct jscs paths 2015-09-07 20:03:50 +03:00
Oleg Gaidarenko
10fdad742a Build: Update jscs and lint files
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Michał Gołębiowski
669cb16d76 Build: Add a comment explaining why the es3 option is needed
It might not be obvious to everyone that IE 9 & Android 4.0 are not
ES5-compliant browsers (by a large margin) so it's better to add a support
comment. This requires slight changes in parsing the config file
as it's not a pure JSON anymore. JSHint understands such files without
problems.

Closes gh-2520
2015-08-03 18:51:18 +02:00
Corey Frang
b3b2d6c3dd Effects: Adding unit tests for jQuery.Animation
Closes gh-2326
2015-06-26 20:06:03 -04:00