Skip to content

Running import { test, fc } from '@fast-check/jest'; results in error reading properties of undefined in jest #4986

@CMCDragonkai

Description

@CMCDragonkai

🐛 Bug Report

I'm trying to use the latest ESM version of @fast-check/jest. I got everything else working.

As soon as I try to import import { test, fc } from '@fast-check/jest'; there seems to be some problem with some undefined property.

  ● Test suite failed to run

    TypeError: Cannot read properties of undefined (reading 'only')

      at internalTestPropConcurrent (node_modules/@fast-check/jest/lib/esm/internals/TestPropBuilder.js:25:43)
      at internalTestProp (node_modules/@fast-check/jest/lib/esm/internals/TestPropBuilder.js:32:18)
      at node_modules/@fast-check/jest/lib/esm/jest-fast-check.js:7:25

Seems something isn't quite working..

To Reproduce

Steps to reproduce:

  1. Go here Migrating to ESM MatrixAI/js-table#3
  2. Try to run npm test

Expected behavior

Clear and concise description of what you expected to happen.

That it just imports properly.

If you have one, please provide a minimal repository reproducing the issue on GitHub.

Your environment

Packages / Softwares Version(s)
fast-check ^3.10.0
node v20.5.1
TypeScript* ^5.1.6

*Only for TypeScript's users

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions