On Thu, Apr 07, 2005 at 11:23:59AM -0700, David Wheeler wrote:
> Greetings fellow Perlers,
> 
> I'm pleased to announce the first alpha release of my port of  
> TestSimple/More/Builder to JavaScript. You can download it from:
> 
>   http://www.justatheory.com/downloads/TestBuilder-0.01.tar.gz

Zee goggles, zey do nothing!!!


> Please feel free to give it a try and let me know what you think. You  
> can see what the tests look like by loading the files in the tests/  
> directory into your Web browser. This is my first stab at what I hope  
> becomes a complete port. I could use some feedback/ideas on a number of  
> outstanding issues:
> 
> * Skip and Todo tests currently don't work because named blocks (e.g.,  
> SKIP: and TODO:) are lexical in JavaScript. Therefore I cannot get at  
> them from within a function called from within a block (at least not  
> that I can tell). It might be that I need to just pass function  
> references to skip() and todo(), instead. This is a rather different  
> interface than that supported by Test::More, but it might work.  

Not so different, that's what I would have done were it not for the fact
that it alters caller().  If Javascript has no such problems then do it,
but I suspect it does.


> Thoughts?

        if( !condition ) {
                skip(because, number);
        }
        else {
                ...test...
        }


> * Currently, one must call Test._ending() to finish running tests. This  
> is because there is no END block to grab on to in JavaScript.  
> Suggestions for how to capture output and append the output of  
> _finish() are welcome. It might work to have the onload event execute  
> it, but then it will have to look for the proper context in which to  
> append it (a <pre> tag, at this point).

Could object destruction be used somehow?

My only other note in glancing over this is to not make the mistake of
parroting eq*, ie. functions which are not tests.  Proceed directly to 
isDeeply() if possible.  If its not possible, if the function prototypes
in Javascript won't allow something like isDeeply() then make the eq* 
functions real tests such that later isDeeply() style diagnostics can be
added.

Reply via email to