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

Node assert errors aren't formatted anymore #4554

Closed
ianwalter opened this issue Sep 28, 2017 · 3 comments
Closed

Node assert errors aren't formatted anymore #4554

ianwalter opened this issue Sep 28, 2017 · 3 comments

Comments

@ianwalter
Copy link

Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?

Node assert errors aren't formatted anymore. I think this could be related to #4376.

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.

  1. Clone & install http://github.com/optick/generator-optick-node-module
  2. Change __tests__/gitignore.js test so that it fails, e.g. change node_modules on line 11 to mode_nodules.
  3. yarn test

Output will be:

AssertionError [ERR_ASSERTION]: 'node_modules\n*.log\n.DS_Store\n' == 'mode_nodules\n*.log\n.DS_Store\n'

What is the expected behavior?

Output should be like this repl.it (uses Jest@20): https://repl.it/LkIe/3

A diff like:

    Expected value to be (operator: ==):
      "node_modules
    *.log
    .DS_Store
    "
    Received:
      "mode_nodules
    *.log
    .DS_Store
    "
    
    Difference:
    
    - Expected
    + Received
    
    - node_modules
    + mode_nodules
      *.log
      .DS_Store

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

Jest configuration in the repo specified above.
Node v8.5.0
NPM v5.4.2
MacOS High Sierra

@thymikee
Copy link
Collaborator

Is this something that changed in Node 8.5.0? Does it work on versions prior to that?

@ianwalter
Copy link
Author

I think this actually might be a problem with how yeoman-assert works with jest@20 vs. jest@21 since I can't reproduce when not using that library. Closing until I can pinpoint the issue. Thanks for your time.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants