aboutsummaryrefslogtreecommitdiff
path: root/node_modules/min-document/test/cleanup.js
blob: d3ae66ab1aa1f407a2c8b4aa71ecb2605145ff30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module.exports = Cleanup

function Cleanup (document) {

    return cleanup

    function cleanup () {
        var childNodes = document.body.childNodes
        for (var i = 0; i < childNodes.length; i++) {
            document.body.removeChild(childNodes[i])
        }
    }
}