Bug Tracker

Ticket #4959 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

[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

moduleBug.htm Download (2.4 KB) - added by dotnetCarpenter 5 years ago.
test case that shows the module setup/teardown bug

Change History

Changed 5 years ago by dotnetCarpenter

test case that shows the module setup/teardown bug

comment:1 Changed 5 years ago by dotnetCarpenter

Last line should have been: For simplicity this refers to document window when not using module.

comment:2 Changed 5 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

Note: See TracTickets for help on using tickets.