• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

qunitjs / qunit / 3180
89%
main: 90%

Build:
Build:
LAST BUILD BRANCH: 2.x
DEFAULT BRANCH: main
Ran 12 Jan 2021 02:35AM UTC
Jobs 1
Files 29
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
3180

push

travis-ci-com

web-flow
Assert: Fix assert.timeout() bug causing a non-async test to fail

For an async test, we normally remember the assigned timeout amount,
and the actual scheduling and enforcement of the timeout doesn't happen
until after the test callback returns.

If the test doesn't happen to be asynchronous, then the amount is
discarded and we simply move on to the next test.

Sometimes, the timeout ID stored in `config.timeout` for a previous
async test would remain and thus caused `assert.timeout()` to wrongly
think it was called twice in the same test, and tries clear and
reschedule it, when actually it is clearing nothing and scheduling
the first timeout and doing so before the test callback has returned.

Thus when the test is over and we "ignore" the timeout, QUnit then
got confused thinking it's an async test and thus waits until it
times out.

Fix this by making sure `config.timeout` is always explicitly emptied
(or re-assigned) when a timeout is cancelled or has completed.

Fixes https://github.com/qunitjs/qunit/issues/1539.

1176 of 1434 branches covered (82.01%)

2085 of 2335 relevant lines covered (89.29%)

348.86 hits per line

Jobs
ID Job ID Ran Files Coverage
7 3180.7 12 Jan 2021 02:35AM UTC 0
89.29
Travis Job 3180.7
Source Files on build 3180
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #3180
  • 4a2e8305 on github
  • Prev Build on master (#3177)
  • Next Build on master (#3184)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc