As far as the website says, you have to run the tests w/in a browser
(nothing wrong with that (see selenium)).
But this one is "nice", because you can run the JUnit-based test
during a maven build.
JSUnit is dual-licensed (GPL/MPL), not sure if that is a -1 in Apache
terms (GPL is a -1)
JSTester uses a more liberal license (Apache 2.0)
-Matthias
On 7/17/07, Blake Sullivan <[EMAIL PROTECTED]> wrote:
How does this compare to JSUnit?
-- Blake
Adam Winer wrote:
> This'd be SWEET!
>
> -- Adam
>
>
> On 7/17/07, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> perhaps we should add some Unit tests (via [1]) to Trinidad,
>> to test stuff like our converters:
>>
>>
>> import junit.framework.TestCase;
>> import net.sf.jstester.JsTester;
>>
>> public class MyTestCase extends TestCase {
>> private JsTester jsTester;
>>
>> protected void setUp() throws Exception {
>> jsTester = new JsTester();
>> // initialize the tester
>> jsTester.onSetUp();
>> jsTester.eval( jsTester.loadScript("Locale.js"));
>> jsTester.eval( jsTester.loadScript("CoreFormat.js") );
>> }
>>
>> public void testInlineJs(){
>> jsTester.eval("var converter = new TrNumberConverter(null,
>> 'percent', null, null);");
>> jsTester.assertNotNull("converter");
>> jsTester.eval("var converted = converter.getAsString(0.54, null);");
>> jsTester.eval("var value ='54%'");
>> jsTester.assertEquals("value", "converted");
>>
>> }
>>
>> @Override
>> protected void tearDown() throws Exception {
>> // cleanup, don't forget!
>> jsTester.onTearDown();
>>
>> }
>>
>> }
>>
>> -Matthias
>>
>> [1] http://jstester.sourceforge.net/
>>
>> --
>> Matthias Wessendorf
>>
>> further stuff:
>> blog: http://matthiaswessendorf.wordpress.com/
>> mail: matzew-at-apache-dot-org
>>
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org