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

fail is not defined #23

Open
ngua opened this issue Sep 30, 2024 · 2 comments
Open

fail is not defined #23

ngua opened this issue Sep 30, 2024 · 2 comments
Labels

Comments

@ngua
Copy link

ngua commented Sep 30, 2024

When a golden test failure occurs, rescript-jest eventually invokes an unbound function fail, leading to a ReferenceError. This can make it harder to debug test failures -- it's not immediately clear, for example, if the error is raised because of a genuine test failure or some other problem.

Example:

Summary of all failing tests
 FAIL  lib/js/__tests__/.../<type>_spec.js
  ● AesonSpec.sampleGoldenSpec: <type> from file '<path>/<type>.json' with encoding latin1 › decode then encode json_file - [object Object]

    ReferenceError: fail is not defined

      at affirm (node_modules/@glennsl/rescript-jest/lib/js/src/jest.js:36:9)
      at Object.<anonymous> (node_modules/@glennsl/rescript-jest/lib/js/src/jest.js:247:19)

@ngua ngua added the bug label Sep 30, 2024
@ngua
Copy link
Author

ngua commented Nov 12, 2024

Apparently it's an upstream issue with Jest: jestjs/jest#11698

@ngua ngua changed the title Bug: fail is not defined fail is not defined Nov 12, 2024
@ngua
Copy link
Author

ngua commented Nov 12, 2024

More context: glennsl/rescript-jest#99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant