Any suggestion to solve issue 2)? The more reliable same-method has
the same issue for argument-order. One idea:
assertThat(actualValue).equalTo(expectedValue), similar to the
Hamcrest API: http://code.google.com/p/hamcrest/wiki/Tutorial
Other suggestions for methods names are welcome, too.
Issu
Thanks for the feedback guys, I reviewed the Form element spec from David
Flanagan's book and realized we have a lot left to do with the
HTMLCollection elements. I should be able to narrow down that particular
test now that I know where to look once I get the rest of the Form stuff
implemented.
T
> ok( jQuery([]).add( document.getElementById('form') ).length >= 13, "Add
> a form (adds the elements)" );
> I'm not able to grep why a form element is treated specially with add, or
> where in the source the single element returned from document.getElementById
> becomes more than a dozen.
For #1, a form element in IE is actually == form.elements (the
collection of elements within the form)... they are basically
indistinguishable.
For #2, I agree and I often have to look up the documentation for equals.
--
Brandon Aaron
On Thu, Aug 20, 2009 at 6:54 PM, chris
thatcher wrote:
> Hi
> The .add() method
> calls the internal .clean() method, which sees this .length property
> and then adds all the elements in the "collection".
On closer look, the .nodeType check is still in clean(). So it seems
like both cases should only put the form element there.
--~--~-~--~~---