Skip to content

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

@rhpijnacker

Description

@rhpijnacker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions