If you clone the jstest-driver project code you will be able to see how it works.
`git clone https://code.google.com/p/js-test-driver/`

To explain this you will need to see this two files:

**Path file:**
JsTestDriver\src\com\google\jstestdriver\javascript\plugins\TestRunnerPlugin.js

**Line Number: 188**

**Path file:**
JsTestDriver\JsTestDriver\src\com\google\jstestdriver\coverage\javascript\plugin.js

**Line Number: 22**

In these lines of code you can see how jstestdriver cleans the body after execute all the 
tests, I only try to replicate the same behaviour with:
```javascript
 document.body.innerHTML = '';
 ```