This is Test JS, perfect for testing your html and javascript code. Link the
The test report is either created in a pop up (new html page) or as a child element of your page.
Insert the following files in your html file:
Add the following script:
Done.
Now when you call 'test()' in our console (or another way), the tests will be excecuted and the results shown.
See the following template
The script section starts with referencing the needed js files
The testcases itself are defined in a separate JavaScript file, typically named
Once the test cases have been performed the results can be printed. Sine T.js is pure javascript, there's no html file created on your file system. Everything happens in your browser
In this version, the tests run automatically when the page loads. You don't need to manually call the `test()` function from the console. The script at the bottom of the page initializes the test manager, executes the test cases, and displays the results as soon as the page is ready.
Next we have to write the test cases. You can set up the structure as you want. The only thing that needs to be considered is that the test varibale 'myTest' must be passed to each test.