Test JS
About Test JS
This is a test class for JavaScript with simple use. You insert the
Create a new instance of the
The default prefix is
Special Feature for
You can add your custom css,html and script to the popup window
by setting the
Unit Tests
Unit tests are a way to test individual functions or methods in your code. Unit test are for functions that:
- don't require any external dependencies and can be run in isolation.
- don't require or simulate any user interaction.
- They are usually small and focused on a single piece of functionality.
you can create the following unit tests. The reuqimrents must be met:
- the test case name has to start with your defined prefix (here 'testCase_')
- the test case function must take the test instance as its only parameter (here: 'myTest')
- test methods must be called with the following parameters:
- actual value: you can directly pass here the function incl. parameters you want to test
- expected value: what the expected result should be
- function name: the name of the function being tested
- test case name: the name of the test or a comment for the test. This is different from the test case name, which is the name of the whole test function (here 'testCase_addition')