-
Notifications
You must be signed in to change notification settings - Fork 783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate module
, rename to group
#190
Comments
"Suite" may be a bit ambiguous since QUnit presents itself as "a powerful, easy-to-use, JavaScript test suite". I don't know of a good alternative, nor whether this really matters, but I think it's worth noting. |
"suite", "label", or "title" would be what I would go for |
"group", "bundle", "set", "collection" |
Any objections to group? That works as a test suite consists of groups of tests. |
Do we also need to rename moduleStart and moduleEnd callbacks? |
I would say yes to renaming the lifecycle logging events too. |
Closing, as globals are optional: The |
The forthcoming native
Which won't conflict with any extant use of the word "module" :) |
Reopen, please. While I appreciate that Harmony modules won't be an issue, that doesn't change the fact that the 'module' object is a de-facto standard with CommonJS. For better or worse, Commonjs is going to be around for a while, and has a significant following thanks to node.js. (11.5K modules on npmjs.org at last count). The emerging practice for these modules is to use Related: |
With regard to @pimvdb's note of:
To me:
I really like @visionmedia's Mocha's TDD syntax, using nestable |
@JamesMGreene: I agree. Just thought I would mention it, since terminology changes are not very pretty if they introduce ambiguity. |
@broofa could you point me to where CommonJS specifies |
@jzaefferer: http://wiki.commonjs.org/wiki/Modules/1.1 - Section 1.1, "Module Context". |
@broofa right, which doesn't specify |
@jzaefferer - Why is that important? The main issue (at least my main issue) is QUnit's declaration of a 'module' global. The specific properties of that global aren't of particular interest. |
Reopening to discuss it again at the next testing team meeting - that would be tomorrow, if we get a few people together, see also calendar on http://jquery.org/meeting/ |
Only two examples have been given where a conflict occurred and both have been resolved already. Changing the name in order to avoid future problems that seem unlikely and are easily fixable seems silly when the cost is breaking all existing code that is using the |
After being bitten by this issue a couple of times, I think it would at least be worth documenting it somewhere to potentially save others some time in the future. |
@andrewchch: Can you share an example of how you are getting bitten? Reviewing the current export code, the only pertinent export I see is basically setting the whole If so, then its usage would always be referencing whatever variable you var QUnit = require('qunitjs');
QUnit.module('blah');
QUnit.test('blah blah blah', function(assert) {
assert.ok(true);
}); |
module
conflicts with the one defined by CommonJS.Would need to deprecate
module
and introducegroup
as an alias, then figure out if and when we can actually removemodule
.Should encourage mocha to also use
group
instead ofsuite
, as that conflicts with our use of suite.The text was updated successfully, but these errors were encountered: