Reputation: 173
is there currently any chrome / browser extension to unit test javascript on a page?
just to be clear, i'm not looking to test the extension itself, rather a tool to run tests on the current page.
Upvotes: 2
Views: 824
Reputation: 24617
Use the built-in assert
method of the console
object in Chrome or most other browsers to run simple unit tests, such as the following:
console.assert(!isFinite(Math.PI),"Math.PI is finite",Math.PI)
References
Upvotes: 2