grgry
grgry

Reputation: 173

Chrome Extension to run javascript unit tests

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

Answers (1)

Paul Sweatte
Paul Sweatte

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

Related Questions