On Mon, Apr 26, 2010 at 10:50 PM, Karl Guertin <
gray...@gmail.com> wrote:
> On Mon, Apr 26, 2010 at 4:45 PM, Alexander Teinum <
ate...@gmail.com> wrote:
>> 1. Is there a good reason why equal() doesn’t use === as default? I
>> never use == myself, but in my tests I use equal() all the time –
>> which in my framework is like strictEquals().
>
> The API follows CommonJS:
>
>
http://wiki.commonjs.org/wiki/Unit_Testing/1.0
>
I’ll add CommonJS to the discussion. I’m curious what others think
would be an ideal behavior for equal() now that the assert API has
been out there for a while.
>> 2. I would like to use throws() like this:
>>
>> test.throws(function() {
>> var events = new WeekEvents([], [], [], []);
>> }, 'weekEvents must contain an array of events for each day.');
>>
>> Is that possible?
>
> Yes. Both the second and third argument are optional and omitting the
> error will do what you want.
>
I also need it to check the equality of the string since my WeekEvents
“class” will throw different messages depending on what I pass to the
constructor.
Alexander
--
You received this message because you are subscribed to the Google Groups "CommonJS" group.
To post to this group, send email to
comm...@googlegroups.com.
To unsubscribe from this group, send email to
commonjs+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/commonjs?hl=en.