Opened 14 years ago
Closed 13 years ago
#3504 closed defect (fixed)
doh.registerGroup setUp and tearDown doesn't work
Reported by: | mumme | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | TestFramework | Version: | 0.9 |
Keywords: | doh.runner registerGroup | Cc: | |
Blocked By: | Blocking: |
Description
Hi !
When trying to figure out how the new unit test system works, I could never get registerGroup setUp and tearDown args to work as documented.
Trying the sample from: http://dojotoolkit.org/book/dojo-porting-guide-0-4-x-0-9/test-system-changes
// file located in core at: // tests/fullGroupTest.js dojo.provide("tests.fullGroupTest"); dojo.require("tests.runner"); tests.registerGroup("tests.fullGroupTest", [ // single test, no test fixture function assertTrueTest(t){ t.t(true); }, // string variant of the same: "tests.t(true);", // test that uses variable set up by group function assertTrueTest(t){ t.t(tests.fullGroupTest._localVariable); }, // ... ], function(){ // setUp tests.fullGroupTest._localVariable = true; }, function(){ // tearDown tests.fullGroupTest._localVariable = false; } );
Fails because setUp is never called.
Regards Fredrik Johansson
Attachments (1)
Change History (5)
comment:1 Changed 13 years ago by
Owner: | changed from alex to Jared Jurkiewicz |
---|
comment:2 Changed 13 years ago by
Status: | new → assigned |
---|
Changed 13 years ago by
Attachment: | dojo_doh_20070802.patch added |
---|
comment:3 Changed 13 years ago by
Problem was that the group level execution merely wasn't calling the group level setup and teardowns. Easy enough to fix.
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Simple patch for this problem.