~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
1 (possibly taking Resig's proposed changes re: equal and equiv to
make it more like the Unit_Testing/A proposal)
Kevin Dangoor wrote:
> I'd like to do a general vote here, rather than a specific vote... by
> which I mean that both API directions can still undergo modification
> as we finish the specs. I just want to gauge the interest level in
> adopting QUnit's API.
>
> Please make a choice between:
>
> 1. Adopt an API substantially the same as QUnit's
> http://docs.jquery.com/QUnit (note that this is API, not
> implementation and also note that we can extend this API easier than
> we can change it)
>
> 2. Adopt an API substantially the same as Unit Testing/A
> http://wiki.commonjs.org/wiki/Unit_Testing/A (and there is some
> interest in extending this to allow for assertion failures to be
> logged rather than to halt the test run)
>
I don't have a strong preference, but if there is an async support (like
QUnit has), I would like to keep the consistency and simplicity of using
promises rather than proliferation of extra APIs for async causes (I
know, this is what I always harp on). Dojo has done that with its
testing framework, and the consistency that it provide is really nice,
extra async APIs are not needed to do asynchronous actions.
Kris
I don't have a strong preference, but if there is an async support (like
QUnit has), I would like to keep the consistency and simplicity of using
promises rather than proliferation of extra APIs for async causes (I
know, this is what I always harp on). Dojo has done that with its
testing framework, and the consistency that it provide is really nice,
extra async APIs are not needed to do asynchronous actions.
Given the two choices, 2.
The way QUnit currently uses equal is borked in my opinion. So,
replacing same with equiv doesn't help.
If we could agree on "equivalent" for equivalence assertion and
"identical" for identity assertion, we could probably find a
compatible API :-)
Problem is, even for me that is getting to be a bit verbose.
Maybe assert.is and assert.eq is better after all.
Problem is, I really disliked assert.ne.
assert.eq, assert.uneq, assert.is, assert.isnt ?
Chris
Chris
1 + nomenclature migration - global module accumulation + punt async
or
2 + common nomenclature + eventally a DSL to support 1 + punt async
I'd love to have interoperability with QUnit on the unit test level
with the given specification, but to do this in a modular fashion (in
the CommonJS modules sense), unit tests would have to be in a test DSL
that injects the QUnit API into each test script. The bike-shedding
on the method names needs to stop, but we are all over the map. I
think we'll ultimately have to agree to support migration to new,
common names in all of our API's, which I do not think would be
onerous even for QUnit, as long as none of the new names are
contradictory. To converge on names, I think we'll have to do fancy
instant run-off voting.
The eventual DSL support requires extensions to the CommonJS module
standard, which I think more than one user has called for, namely the
standardization of loader interfaces, like
require.loader.load(id)(injection).
Summarily, my vote is more like 2 than 1, with emphasis on convergence.
Kris Kowal
>
> On Fri, Oct 9, 2009 at 7:00 AM, Kevin Dangoor <dan...@gmail.com>
> wrote:
>> I'd like to do a general vote here, rather than a specific vote...
>> by which
>> I mean that both API directions can still undergo modification as
>> we finish
>> the specs. I just want to gauge the interest level in adopting
>> QUnit's API.
>>
>> Please make a choice between:
>>
>> 1. Adopt an API substantially the same as QUnit's
>> http://docs.jquery.com/QUnit (note that this is API, not
>> implementation and
>> also note that we can extend this API easier than we can change it)
>>
>> 2. Adopt an API substantially the same as Unit Testing/A
>> http://wiki.commonjs.org/wiki/Unit_Testing/A (and there is some
>> interest in
>> extending this to allow for assertion failures to be logged rather
>> than to
>> halt the test run)
>
1 unreservedly from me.
One version of the specification treated Array as a special case of
Object, but it was pointed out that checking the values of respective
indicies was insufficient because you can also add properties to
arrays. So, that line was removed and the line about comparing
objects by their respective owned properties catches the array case.
Kris Kowal