QUnit advertises itself on its web page like this:...capable of testing any generic JavaScript code, including itself!Can you really use unit testing software to test itself? Wouldn't defects in the software mean that the results are unreliable?
Can unit testing software be used to unit test itself?
unit testing
Yes, it can. JUnit has an extensive test suite to test its own features, and ask any of the authors you like - they will tell you that this is essential to their productivity in extending the project. Probably most testing tools do the same.The trick is that there is no particular need for a test of a new feature to be actually using the new feature itself - it merely has to exercise it and test the result. In this way, confidence in part of the functionality of a system can be used to establish confidence in a much larger part. This is similar to the way self-hosting compilers are bootstrapped, and it is a fundamental technique in computing theory.