'use strict'; /** * Execute testharness.js and one or more scripts in an iframe. Report the * results of the execution. * * @param {...function|...string} bodies - a function body. If specified as a * function object, it will be * serialized to a string using the * built-in * `Function.prototype.toString` prior * to inclusion in the generated * iframe. * * @returns {Promise} eventual value describing the result of the test * execution; the summary object has two properties: * `harness` (a string describing the harness status) and * `tests` (an object whose "own" property names are the * titles of the defined sub-tests and whose associated * values are the subtest statuses). */ function makeTest(...bodies) { const closeScript = '<' + '/script>'; let src = `