Support DOM nodes in TapReporter value formatting
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 4k
- Forks
- 773
- PR merge metrics
- No merged PRs in 30d
Description
Tell us about your runtime:
- QUnit version: 3.0.0-alpha.2
- Which environment are you using? (e.g., browser, Node): Browser
What are you trying to do?
QUnit.reporters.tap.init(QUnit);
QUnit.test('HtmlReporter disabled', function (assert) {
var children = [].slice.call(document.querySelectorAll('#qunit > *'));
assert.deepEqual(children, [], '#qunit element is empty');
});
What did you expect to happen?
The TAP output in the console should be able to format DOM nodes, similar to how we format them in the HTML output.
Historically, we used the TAP reporter mainly in Node.js, but when using it to relay test results from a remote browser, this becomes more important.
<div id="example"></div>
What actually happened?
DOM nodes render as {}.
Other information
If we fix this, that would also make it more attractive to utilize TAP in grunt-contrib-qunit, where currently DOM nodes also aren't formatted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at QUnit.reporters.tap.init(QUnit) and trace the TAP reporter's value formatting for the browser DOM-node example in the issue. Done means DOM nodes render as HTML-like output rather than {}, with the behavior checked in a browser; the payload names no specific test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100