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

Failing testcase on assert.strictEqual with circular parameter does not appear in reporter #1167

Open
rhpijnacker opened this issue Jun 17, 2020 · 1 comment
Labels
needs-verification Needs to be verified
Projects

Comments

@rhpijnacker
Copy link
Contributor

When I use assert.strictEqual in a test case and pass in an object with a circular reference, then the test case is not logged by the reporters (console, html) as a failing test case. It is listed as failing in the overview, though (1/1 tests failed).

This test case demonstrates the problem:

const { registerSuite } = intern.getInterface('object');
const { assert } = intern.getPlugin('chai');
define(['module'], function(module) {
  registerSuite(module.id, {
    tests: {
      'Test does not appear in reporter'() {
        const a = { b: null };
        const b = { a: a };
        a.b = b;
        assert.strictEqual(a, null);
      }
    }
  });
});

Environment

Intern version: 4.8.3
Chrome: v83

@github-actions github-actions bot added the needs-verification Needs to be verified label Jun 17, 2020
@github-actions github-actions bot added this to Triage in Development Jun 17, 2020
@SachsKaylee
Copy link

Hello,
we are also currently facing this issue. This is due to the serialization failing in this line:

this._socket.send(JSON.stringify(message));

Our data structures contain a lot of circular data so removing them for the test won't be a realistic option. Are there any plans for this issue?

Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-verification Needs to be verified
Projects
Development

No branches or pull requests

2 participants