Skip to content

Async import generated by inline-test-ppx doesn't work with rescript-test #6

@evelant

Description

@evelant

The generated test import files use an async import like so:

import("../../src/myfile.mjs").catch(e => {
  if (e.code !== "ERR_MODULE_NOT_FOUND") reject(e)
});

but that breaks rescript-test, it will always find 0 tests because the import hasn't resolved yet when it tries to run them

changing it to a synchronous import makes it work correctly

import "../../src/myfile.mjs"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions