Ticket #4959 (closed bug: invalid)
[QUnit] Module Bug
| Reported by: | dotnetCarpenter | Owned by: | joern |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | qunit | Version: | 1.3.2 |
| Keywords: | module | Cc: | joern.zaefferer@… |
| Blocking: | Blocked by: |
Description
When assigning variables and functions to this in setup or teardown, it is impossible to access them in tests as they are always 'undefined'.
In the test case I have made a simple object that contains a private array. When using module(name, {options}) all tests fails but if you uncomment the 'this works!' section all tests pass and comment the module section. Interesting stuff happens when you uncomment both, but I haven't had time to explore what actually happens.
For simplicity this refers to document when not using module.
Attachments
Change History
Changed 4 years ago by dotnetCarpenter
-
attachment
moduleBug.htm
added
comment:1 Changed 4 years ago by dotnetCarpenter
Last line should have been:
For simplicity this refers to document window when not using module.
comment:2 Changed 4 years ago by joern
- Status changed from new to closed
- Resolution set to invalid
QUnit works fine. You were using an old version of QUnit which didn't support the extended modules.
Really not your fault: The project still doesn't have a proper release to which I could refer you, and the documentation referred to an out-of-date mirror. Currently the most current file is here: http://jqueryjs.googlecode.com/svn/trunk/qunit/testrunner.js
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

test case that shows the module setup/teardown bug