Comments (1)
@david-pfx I'm interested in exploring this, and like the idea of allowing rich text formatting. This would unlock many interesting features.
QUnit output is often passed through (or presented in) contexts where there is no HTML support. For example, most CI systems these days present build output as plain text (Jenkins, Travis CI, GitHub Actions, etc.). This includes e.g. when one uses cross-browser runners such as Karma, Headless Chrome via grunt-contrib-qunit, cloud browsers such via browserstack-runner, or e.g. when using QUnit to test a Node.js package.
Other examples exist within the browser, when using the TAP reporter, which prints to the browser console. While this is testing frontend JavaScript inside a browser, the web page is empty, with the QUnit results printed in the browser console.
If your need is mainly to make links clickable, perhaps an alternative would be for QUnit to do what browsers, terminals, and CI systems also do with their output - they automaticlaly scan for URLs in the plain text, and turn them into clickable links. Would that work for you?
A few other ideas based on your HTML proposal:
- QUnit could render the HTML code as unparsed HTML in these contexts. This seems suboptimal as that would look broken.
- QUnit could try to strip the HTML tags and render the remaining text. This would be fine for simple text styling, but for links this would make the URL inaccessible.
- QUnit could require that, if you specify an HTML message, that you also specify a plain text version. This would place extra work on developers and make for a more complicated Assertion API.
from qunit.
Related Issues (20)
- Improve assert.async Function to Handle Type Checking
- Qunit v2 has incorrectly configured exports HOT 4
- Drop support for IE9-IE10 HOT 3
- Can we move this repo to a monorepo so we can more accurately test different usage scenarios? HOT 1
- Drop support for node < 18? HOT 1
- Can we drop builtin AMD support? HOT 6
- Can we start a `next` branch so I can start PRing improvements? HOT 1
- Let simple array data in test.each() serve as automatic labels
- Facilitate "close to" number equal assertion HOT 3
- [Feature Request]: Allow more customization of how errors are handled (especially uncaughtrejection). HOT 1
- Web Test Runner and QUnit reporting problems HOT 9
- qunit cannot parse private functions and properties HOT 2
- Support multiple `module` parameters (QUnit.config.module array) HOT 2
- Unify qunitjs.com and api.qunitjs.com
- [QUESTION] How can I forcefully abort a testcase and advance to next in queue HOT 1
- Let the test.each callback access the current case key HOT 3
- deepEqual should not compare constructors HOT 2
- Document QUnit.urlsParams
- Add tests for QUnit.config.fixture HOT 1
- Stack trace cleaning preserves URLs with ports HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qunit.