You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To run Java2Script unit tests you must use a j2slib that contains "junit".
To build a j2slib with "junit" follow the description given in 'Building j2slib (The Runtime Library)' but when starting the Ant build make sure to set the Ant property j2s.lib.include.junit to true.
I.e. when starting Ant from the command line (in the 'net.sf.j2s.lib' directory)
run ant -Dj2s.lib.include.junit=true -f build/build.xml
When starting Ant from within Eclipse:
Right-click "build/build.xml" and select "Run As > Ant Build..."
(An 'Edit Configuration' dialog appears.)
In the 'Main' tab find the 'Arguments:' field and enter:
While running the test output is written to the 'J2S Console' in Eclipse.
Click the button 'Run in External Browser' in the 'J2S Console' to re-run the test in an external browser. Especially when debugging JavaScript code using an external browser (and its 'Developer Tools') is the preferred way to go.
But also for "normal" test runs use the external browser because the output to the 'J2S console' is not always updated (see Issue #17).