RationalJS / future

A Js.Promise alternative for ReasonML
213 stars 15 forks source link

Unable to run test suites #43

Closed tomp4l closed 4 years ago

tomp4l commented 4 years ago

I've been trying to develop a PR for an issue I've found. When running npm test:only I get the following error:

    at Function.o.cleanStackTrace (.../future/node_modules/ospec/ospec.js:53:71)
    at report (.../future/node_modules/ospec/ospec.js:241:24)
    at next (.../future/node_modules/ospec/ospec.js:133:14)
    at done (.../future/node_modules/ospec/ospec.js:103:20)
    at pop (.../future/node_modules/ospec/ospec.js:76:7)
    at next (.../future/node_modules/ospec/ospec.js:133:14)
    at done (.../future/node_modules/ospec/ospec.js:103:20)
    at pop (.../future/node_modules/ospec/ospec.js:76:7)
    at next (.../future/node_modules/ospec/ospec.js:133:14)
    at done (.../future/node_modules/ospec/ospec.js:103:20)```

After hacking around with ospec.js I managed to get the tests to sort of work but most failed with time out and this test is clearly going to fail as it will create the output "rock! infix ops": https://github.com/tomp4l/future/blob/master/tests/TestFuture.re#L266-L272

/* These are equivalent */
let prependSpace = (++)(" ");
let prependSpace = (s) => " " ++ s

You can see from the compiled JS it's prepending the strings:

image

I would like to submit a feature to make map and flatMap stack safe but without working tests it's hard for me to contribute.

briangorman commented 4 years ago

@tomp4l, I just merged #36, could you check if you still have these problems/if you concerns are resolved?

tomp4l commented 4 years ago

@briangorman Fixed :+1: Thank you