Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DOM nodes in TapReporter value formatting #1783

Open
Krinkle opened this issue Jul 21, 2024 · 0 comments
Open

Support DOM nodes in TapReporter value formatting #1783

Krinkle opened this issue Jul 21, 2024 · 0 comments
Labels
Component: Core For module, test, hooks, and reporters. Type: Bug Something isn't working right.
Milestone

Comments

@Krinkle
Copy link
Member

Krinkle commented Jul 21, 2024

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 {}.

Screenshot

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.

Screenshot
@Krinkle Krinkle added Type: Bug Something isn't working right. Component: Core For module, test, hooks, and reporters. labels Jul 21, 2024
@Krinkle Krinkle changed the title Support for DOM nodes in TapReporter value formatting Support DOM nodes in TapReporter value formatting Jul 21, 2024
@Krinkle Krinkle added this to the 3.x release milestone Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core For module, test, hooks, and reporters. Type: Bug Something isn't working right.
Development

No branches or pull requests

1 participant