Skip to content

[Bug]: snapshots don't work in dual package esm+cjs Typescript repo (ts-jest), even with "module": "CommonJS" #14723

@darkbasic

Description

@darkbasic

Version

v30.0.0-alpha.2

Steps to reproduce

  1. Clone https://github.com/darkbasic/jest-esm-repro
  2. yarn install
  3. yarn test

Expected behavior

A snapshot should be generated and eventually written to disk (with -u).

Actual behavior

Tests pass despite snapshots should be generated.

Additional context

I've tried jest 29 as well.

Environment

System:
    OS: Linux 6.6 Arch Linux
    CPU: (16) x64 AMD Ryzen 9 PRO 7940HS w/ Radeon 780M Graphics
  Binaries:
    Node: 20.10.0 - /run/user/1000/fnm_multishells/1050532_1701077373135/bin/node
    Yarn: 3.7.0 - /run/user/1000/fnm_multishells/1050532_1701077373135/bin/yarn
    npm: 10.2.3 - /run/user/1000/fnm_multishells/1050532_1701077373135/bin/npm
  npmPackages:
    jest: workspace:* => 30.0.0-alpha.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions