Import the TestReporter, in the unit and font tests

This way it's no longer necessary to load it as a script in the html-files.
This commit is contained in:
Jonas Jenwald 2020-10-27 11:15:06 +01:00
parent 8098102714
commit 8eeb0bcbe4
5 changed files with 8 additions and 7 deletions

View File

@ -7,7 +7,6 @@
<script src="../../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script src="../../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<script src="../unit/testreporter.js"></script>
<script defer src="../../node_modules/es-module-shims/dist/es-module-shims.js"></script>
<script type="importmap-shim">

View File

@ -34,12 +34,14 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* globals jasmineRequire, TestReporter */
/* globals jasmineRequire */
// Modified jasmine's boot.js file to load PDF.js libraries async.
"use strict";
import { TestReporter } from "../unit/testreporter.js";
async function initializePDFJS(callback) {
await Promise.all(
[

View File

@ -34,12 +34,14 @@
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* globals jasmineRequire, TestReporter */
/* globals jasmineRequire */
// Modified jasmine's boot.js file to load PDF.js libraries async.
"use strict";
import { TestReporter } from "./testreporter.js";
async function initializePDFJS(callback) {
const modules = await Promise.all(
[

View File

@ -1,6 +1,3 @@
"use strict";
// eslint-disable-next-line no-unused-vars
const TestReporter = function (browser) {
function send(action, json, cb) {
const r = new XMLHttpRequest();
@ -91,3 +88,5 @@ const TestReporter = function (browser) {
setTimeout(sendQuitRequest, 500);
};
};
export { TestReporter };

View File

@ -7,7 +7,6 @@
<script src="../../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
<script src="../../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
<script src="testreporter.js"></script>
<script defer src="../../node_modules/es-module-shims/dist/es-module-shims.js"></script>
<script type="importmap-shim">