]> source.dussan.org Git - jquery-ui.git/commit
Tests: Ensure no timers are running at the end of each test (#1920)
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Sat, 16 May 2020 07:16:24 +0000 (09:16 +0200)
committerGitHub <noreply@github.com>
Sat, 16 May 2020 07:16:24 +0000 (09:16 +0200)
commite7a10c70ae75c741992afdda60a433be205fd85e
tree7c9f0d717f944107930608316ed346fbdf5f12c5
parentf4ef03e57edd7e51cb134e902679c7bddc3daaee
Tests: Ensure no timers are running at the end of each test (#1920)

This helps fix issues that make tooltip tests sometimes fail when run against
jQuery 3.2 or newer due to timing differences.

Details:
* Add the `moduleAfterEach` function ensuring no timers are running.
* Attach this function via `common.testWidget`.
* Attach this function to most test suites.
* Add a tooltip test helper cleaning up leftover timers.
* Rename legacy `setup`/`teardown` hooks to `beforeEach`/`afterEach`.

Closes gh-1920
92 files changed:
tests/lib/common.js
tests/lib/helper.js
tests/unit/accordion/core.js
tests/unit/accordion/events.js
tests/unit/accordion/helper.js
tests/unit/accordion/methods.js
tests/unit/accordion/options.js
tests/unit/autocomplete/core.js
tests/unit/autocomplete/events.js
tests/unit/autocomplete/methods.js
tests/unit/autocomplete/options.js
tests/unit/button/core.js
tests/unit/button/deprecated.js
tests/unit/button/events.js
tests/unit/button/methods.js
tests/unit/button/options.js
tests/unit/checkboxradio/core.js
tests/unit/checkboxradio/events.js
tests/unit/checkboxradio/methods.js
tests/unit/checkboxradio/options.js
tests/unit/controlgroup/core.js
tests/unit/controlgroup/methods.js
tests/unit/controlgroup/options.js
tests/unit/core/core.js
tests/unit/core/selector.js
tests/unit/datepicker/core.js
tests/unit/datepicker/events.js
tests/unit/datepicker/helper.js
tests/unit/datepicker/methods.js
tests/unit/datepicker/options.js
tests/unit/dialog/core.js
tests/unit/dialog/deprecated.js
tests/unit/dialog/events.js
tests/unit/dialog/methods.js
tests/unit/dialog/options.js
tests/unit/draggable/core.js
tests/unit/draggable/events.js
tests/unit/draggable/methods.js
tests/unit/draggable/options.js
tests/unit/droppable/core.js
tests/unit/droppable/events.js
tests/unit/droppable/methods.js
tests/unit/droppable/options.js
tests/unit/effects/core.js
tests/unit/effects/scale.js
tests/unit/form-reset-mixin/core.js
tests/unit/menu/core.js
tests/unit/menu/events.js
tests/unit/menu/methods.js
tests/unit/menu/options.js
tests/unit/position/core.js
tests/unit/progressbar/core.js
tests/unit/progressbar/events.js
tests/unit/progressbar/methods.js
tests/unit/progressbar/options.js
tests/unit/resizable/core.js
tests/unit/resizable/events.js
tests/unit/resizable/methods.js
tests/unit/resizable/options.js
tests/unit/selectable/events.js
tests/unit/selectable/methods.js
tests/unit/selectable/options.js
tests/unit/selectmenu/core.js
tests/unit/selectmenu/events.js
tests/unit/selectmenu/methods.js
tests/unit/selectmenu/options.js
tests/unit/slider/core.js
tests/unit/slider/events.js
tests/unit/slider/methods.js
tests/unit/slider/options.js
tests/unit/sortable/core.js
tests/unit/sortable/events.js
tests/unit/sortable/methods.js
tests/unit/sortable/options.js
tests/unit/spinner/core.js
tests/unit/spinner/deprecated.js
tests/unit/spinner/events.js
tests/unit/spinner/methods.js
tests/unit/spinner/options.js
tests/unit/tabs/core.js
tests/unit/tabs/events.js
tests/unit/tabs/methods.js
tests/unit/tabs/options.js
tests/unit/tooltip/core.js
tests/unit/tooltip/deprecated.js
tests/unit/tooltip/events.js
tests/unit/tooltip/helper.js [new file with mode: 0644]
tests/unit/tooltip/methods.js
tests/unit/tooltip/options.js
tests/unit/widget/animation.js
tests/unit/widget/classes.js
tests/unit/widget/core.js