Skip to content

Stack trace with wrong line number #7402

Closed
@fotonmoton

Description

@fotonmoton

🐛 Bug Report

Promise-based test (maybe not only promise-based) fails with wrong stack trace (jest points to wrong line number). Maybe this issue somehow related to #6108 or #6556 or #6424, but I can reproduce this bug with and without watch mode.

image

To Reproduce

Don't know what exactly causes this issue. Simply run yarn jest or yarn jest --watch

Expected behavior

Jest will point to right line that caused error.

Link to repl or repo (highly encouraged)

Here is repo with buggy test.

Run npx envinfo --preset jest

npx: installed 1 in 1.425s

  System:
    OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
  Binaries:
    Node: 8.12.0 - /usr/bin/node
    Yarn: 1.12.3 - /usr/bin/yarn
    npm: 6.4.1 - /usr/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions