W3C home > Mailing lists > Public > www-dom-ts@w3.org > June 2002

Re: Status check

From: Robert Clary <bclary@netscape.com>
Date: Tue, 04 Jun 2002 12:51:35 -0400
Message-ID: <3CFCF017.3010507@netscape.com>
To: "Arnold Curt" <Curt.Arnold@hyprotech.com>
CC: "'www-dom-ts@w3.org'" <www-dom-ts@w3.org>



Arnold, Curt wrote:
> Bob Clary wrote:
> 
>>Can't the build process copy the jsUnitCore.js script into the test 
>>directory?
> 
> 
> That can be done but it fixes the test to only working with one specific
> version of JSUnit (or versions of JSUnit with a compatible jsUnitCore.js).
> If you tried to run the test suite with a latter version of JSUnit, bad
> things might happen.
> 
> If the implementation of the methods could be moved out of jsUnitCore.js and
> replaced by proxies that do something like:
> 
> function assertTrue(msg, value) {
>    //  delegate to implementation in test runner
>    //    actual statement is bogus
>    navigator.frames(2).assertTrue(msg,value);
> }
> 
> Then you'd be able to switch to later versions of JSUnit without needed to
> replace the jsUnitCore.js files in your test directories.
> 
> 

I suppose you could do this. An implementation of the functions is 
available in the main-data.html page. You will still need to replicate 
the page loading logic and the definition of JSUNIT_UNDEFINED_VALUE from 
jsUnitCore.js in your test page however. Seems like extra work to remove 
a conditional copy in a build process, but feel free to do whatever you 
think is best.
Received on Tuesday, 4 June 2002 12:54:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:05 UTC