8000 🚀 Feature: toggle diff message short form · Issue #5386 · mochajs/mocha · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
🚀 Feature: toggle diff message short form #5386
Open
@bmarker

Description

@bmarker

Feature Request Checklist

Overview

Related to #3531 and #5385, I'd like to be able to turn off that regex/shortening. I'm assuming some people want the short form, so it needs to be an option rather than just removed.

Suggested Solution

Add a toggle around here.

Alternatives

More specific custom messages.

Additional Info

Test case:

describe('reporter', function () {
  it('should log', function () {
    const resultCount = 0
    expect(resultCount, 'Result count').to.be.greaterThan(0)
  })
})

Output:

  1) reporter
       should log:

      Result count
      + expected - actual


      at Context.<anonymous> (...)

Desired output:

  1) reporter
       should log:

      AssertionError: Result count: expected +0 to be above +0
      + expected - actual


      at Context.<anonymous> (...)

I do not want to add e message with the expectation:

  1. That can get out of sync if you update the expectations
  2. It's more to change when copying between tests
  3. It still does not show you the actual value unless you add that to your message too

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in triagea maintainer should (re-)triage (review) this issuetype: featureenhancement proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0