Opened 11 years ago
Closed 11 years ago
#3628 closed enhancement (wontfix)
Module lifecycle doesn't support asynchronous methods (+opera.postError)
Reported by: | greut | Owned by: | joern |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | qunit | Version: | 1.2.6 |
Keywords: | qunit, testrunner | Cc: | greut |
Blocked by: | Blocking: |
Description
Hi, the following test, will not work with the current version of testrunner.js, because setup, callback and test aren't synchronized(see @5847).
module("Asynchronous setup", { setup: function() { window.global_is_evil = false; window.setTimeout(function() { window.global_is_evil = true; start(); }, 1000); stop(); } }); test("Test after an asynchronous setup", function() { ok(window.global_is_evil, true, "Is global evil"); });
Find this patch that put each one into a sync call and the output takes also benefit of opera.postError (because console isn't supported).
Kind regards,
-- Yoan Blanc
Attachments (1)
Change History (4)
Changed 11 years ago by
Attachment: | testrunner_async_lifecycle.js added |
---|
comment:1 Changed 11 years ago by
ok(window.global_is_evil, true, "Is global evil");
should be:
equals(window.global_is_evil, true, "Is global evil");
comment:2 Changed 11 years ago by
Cc: | greut added |
---|---|
Component: | unfilled → qunit |
Owner: | changed from flesler to joern |
comment:3 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Imporved the error handling in Opera as proposed in r6383.
Asynchronouse calls in lifecycles methods won't be supported.
Note: See
TracTickets for help on using
tickets.
setup/teardown are synced + opera.postError