Skip to content

Stack trace cleaning preserves URLs with ports #1769

@Krinkle

Description

@Krinkle

When serving test suites from a URL like localhost:4000/test/index.html, QUnit's stack trace cleaner doesn't work. This falls back gracefully to showing the full stack trace, but we could do better here.

Example from the MediaWiki VisualEditor test suite:

ve.ui.UrlStringTransferHandler.static.matchFunction@http://localhost:4000/load.php/ext.visualEditor.core:55909:2
ve.ce.Surface.prototype.afterPaste@http://localhost:4000/load.php/ext.visualEditor.core:34356:18
ve.test.utils.runSurfacePasteTest@http://localhost:4000/load.php/test.VisualEditor/26712:28
@http://localhost:4000/load.php/test.VisualEditor:29497:8
runTest@http://localhost:4000/resources/lib/qunitjs/qunit.js:2697:35
run@http://localhost:4000/resources/lib/qunitjs/qunit.js:2680:16
queue/runTest/<@http://localhost:4000/resources/lib/qunitjs/qunit.js:2951:16
processTaskQueue@http://localhost:4000/resources/lib/qunitjs/qunit.js:2271:26
processTaskQueue/<@http://localhost:4000/resources/lib/qunitjs/qunit.js:2275:29

This affects both the HTML Reporter and the TAP Reporter (QUnit CLI) alike. It's shared code, exposed via testEnd event data to reporters.

The bottom half should have been trimmed off by the stacktrace cleaner.

Metadata

Metadata

Assignees

Labels

Component: CoreFor module, test, hooks, and reporters.Type: BugSomething isn't working right.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions