Catalog · How the catalog works
jvTest
A simple testing framework for scripts produced in the jvInterpreter.
- ★ 2 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
jvTest
A simple testing framework for scripts produced in the jvInterpreter. Inspired by Jasmine.
Installation
To install jvTest, simply combine the Edit Scripts folder in the repository with whatever directory is holding the scripts to be executed within your jvInterpreter environment.
With xEdit
As an example, xEdit script developers should combine the Edit Scripts folder with xEdit's Edit Scripts folder.
Other environments
For other environments, you'll want to make sure you have the jvInterpreter set up properly. See the JEDI Visual Component Library repository on GitHub.
Usage
Feel free to check out the example script to get an idea of how to use jvTest.
Quick run-down
- Always initialize jvTest before testing with
jvtInitialize; - When you have a group of tests to perform, use the
Describe(string)function to inform the framework that you're in a group of tests. - Wrap all your tests in a try-except block, with
Pass;being the last line of code in the try, andon x: Exception do Fail(x)for the exception handler (you can expand the exception handler for tear-down as necessary). - You can use
Expect(boolean, string)orExpectEqual(Variant, Variant, string)to test results - You can print a report of the tests performed before finalizing jvTest with
jvtPrintReport; - Always finalize jvTest when done testing with
jvtFinalize;

