Bug Tracker

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)

testrunner_async_lifecycle.js (2.4 KB) - added by greut 11 years ago.
setup/teardown are synced + opera.postError

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by greut

setup/teardown are synced + opera.postError

comment:1 Changed 11 years ago by greut

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 flesler

Cc: greut added
Component: unfilledqunit
Owner: changed from flesler to joern

comment:3 Changed 11 years ago by joern

Resolution: wontfix
Status: newclosed

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.