glennsl/rescript-jest

Skip.testPromise sets test name to undefined

smith-kyle opened this issue · 2 comments

Skip.testPromise("can get a model and train it", () => {
    ...
});

compiles to

it.skip(undefined, "can get a model and train it", (function () {}))

Which throws

Invalid first argument, undefined. It must be a string.

Ah yes, the addition of the optional timeout argument is causing that, though I'm surprised this hasn't been caught by the test suite. Perhaps this failure case was added to Jest only recently.

It shouldn't be hard to fix, but I probably don't have time to do it until next week. Moving the argument to the second position would probably suffice, otherwise the external will have to be wrapped in a function that just ignores the timeout argument.

Thanks!