Skip to content

fail is not defined #23

@ngua

Description

@ngua

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions