Re: Status check

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