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

noCodeFrame respects noStackTrace #9866

Merged
merged 6 commits into from
Apr 23, 2020

Conversation

ychi
Copy link
Contributor

@ychi ychi commented Apr 22, 2020

Summary

When --noStackTrace flag is set, code frames should not be printed as mentioned here

Test plan

New snapshot test cases added.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

'path_test',
);

expect(message).toMatchSnapshot();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(message).toMatchSnapshot();
expect(wrap(message)).toMatchSnapshot();

import {wrap} from 'jest-snapshot-serializer-raw';

will get rid of the wrapping "`.

Please apply to both 😀

@SimenB
Copy link
Member

SimenB commented Apr 23, 2020

@ychi ah no sorry, these use ansi. I take it all back, please revert last commit 😅

@ychi
Copy link
Contributor Author

ychi commented Apr 23, 2020

@SimenB, thank you for helping to revert. There seems to be an CI error for windows before adding wrap?

@SimenB
Copy link
Member

SimenB commented Apr 23, 2020

@ychi seems transient to me, let's see what CI says now 🙂

@codecov-io
Copy link

Codecov Report

Merging #9866 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9866   +/-   ##
=======================================
  Coverage   64.39%   64.39%           
=======================================
  Files         290      290           
  Lines       12361    12361           
  Branches     3056     3054    -2     
=======================================
  Hits         7960     7960           
  Misses       3761     3761           
  Partials      640      640           
Impacted Files Coverage Δ
packages/jest-message-util/src/index.ts 73.82% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32aaff8...69c74e1. Read the comment docs.

@SimenB SimenB merged commit 6cbd3cb into jestjs:master Apr 23, 2020
@ychi ychi deleted the noCodeFrame-respects-noStackTrace branch April 23, 2020 20:56
jeysal added a commit to mmkal/jest that referenced this pull request Apr 26, 2020
…pshots

* upstream/master: (39 commits)
  Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888)
  Show coverage of sources related to tests in changed files (jestjs#9769)
  fix: don't /// <reference types="jest" /> (jestjs#9875)
  noCodeFrame respects noStackTrace (jestjs#9866)
  chore: update example to react-native@0.62 (jestjs#9746)
  Improve source map handling when instrumenting transformed code (jestjs#9811)
  Update .vscode/launch.json settings (jestjs#9868)
  chore: verify all packages have the same engine requirement (jestjs#9871)
  fix: pass custom cached realpath function to `resolve` (jestjs#9873)
  chore: mock stealthy-require in tests (jestjs#9855)
  chore: update resolve (jestjs#9872)
  chore: run CircleCI on node 14 (jestjs#9870)
  Add an option to vscode settings to always use workspace TS (jestjs#9869)
  fix(esm): handle parallel imports (jestjs#9858)
  chore: run CI on Node 14 (jestjs#9861)
  feat: add `@jest/globals` package for importing globals explici… (jestjs#9849)
  chore: bump resolve package (jestjs#9859)
  chore(runtime): simplify `createJestObjectFor` (jestjs#9857)
  chore: fix symlink creation failures on windows in tests (jestjs#9852)
  chore: skip mercurial tests when no hg installed (jestjs#9840)
  ...
jeysal added a commit to mmkal/jest that referenced this pull request Apr 26, 2020
…pshots

* upstream/master: (39 commits)
  Prints the Symbol name into the error message with a custom asymmetric matcher (jestjs#9888)
  Show coverage of sources related to tests in changed files (jestjs#9769)
  fix: don't /// <reference types="jest" /> (jestjs#9875)
  noCodeFrame respects noStackTrace (jestjs#9866)
  chore: update example to react-native@0.62 (jestjs#9746)
  Improve source map handling when instrumenting transformed code (jestjs#9811)
  Update .vscode/launch.json settings (jestjs#9868)
  chore: verify all packages have the same engine requirement (jestjs#9871)
  fix: pass custom cached realpath function to `resolve` (jestjs#9873)
  chore: mock stealthy-require in tests (jestjs#9855)
  chore: update resolve (jestjs#9872)
  chore: run CircleCI on node 14 (jestjs#9870)
  Add an option to vscode settings to always use workspace TS (jestjs#9869)
  fix(esm): handle parallel imports (jestjs#9858)
  chore: run CI on Node 14 (jestjs#9861)
  feat: add `@jest/globals` package for importing globals explici… (jestjs#9849)
  chore: bump resolve package (jestjs#9859)
  chore(runtime): simplify `createJestObjectFor` (jestjs#9857)
  chore: fix symlink creation failures on windows in tests (jestjs#9852)
  chore: skip mercurial tests when no hg installed (jestjs#9840)
  ...
@github-actions
Copy link

This pull request 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 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants