Closed
Bug 597578
Opened 14 years ago
Closed 14 years ago
add CommonJS assert module
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: harth, Unassigned)
Details
(Whiteboard: [mozmill-2.0+])
We should add the standard CommonJS assert module to Mozmill, putting it in the scope so test authors can import with:
var assert = require("assert");
assert.ok(true, "this should be true");
The specification lives here http://wiki.commonjs.org/wiki/Unit_Testing/1.0#Assert
The most up-to date implementation lives in node.js http://github.com/ry/node/blob/master/lib/assert.js, we will probably steal from one of the current implementations
Comment 1•14 years ago
|
||
Those will replace the JUM module's functions or our controller assert functions? I assume the first ones.
Reporter | ||
Comment 2•14 years ago
|
||
Yeah, it could replace the JUM module. The assert module contains less assert variations than the JUM module, but is pretty flexible:
JUM.assertUndefined(property) == assert.strictEqual(property, undefined)
JUM.assertNotNull(property) == assert.notStrictEqual(property, null)
JUM:
["assert", "assertTrue", "assertFalse", "assertEquals", "assertNotEquals",
"assertNull", "assertNotNull", "assertUndefined", "assertNotUndefined",
"assertNaN", "assertNotNaN", "fail", "pass"]
CommonJS assert:
["ok", "equal", "notEqual", "deepEqual", "notDeepEqual", "strictEqual", "notStrictEqual", "throws"]
Reporter | ||
Updated•14 years ago
|
Whiteboard: [mozmill-2.0?]
I believe Heather's already working on this.
Whiteboard: [mozmill-2.0?] → [mozmill-2.0+]
Comment 4•14 years ago
|
||
I'm also working on a solution for our shared modules right now. Lets sit together for a better planning. My current work happens on bug 634225.
Reporter | ||
Comment 5•14 years ago
|
||
doing a CommonJS-based, but customized assert module in bug 637880
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
Comment 6•11 years ago
|
||
Stumbled on this bug - FTR, the CommonJS assert module did land in bug 873126.
Assignee | ||
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•