Closed jamespic closed 7 years ago
I want to make sure that I can use this branch in my code that expects the flow types to exist. I also would probably prefer to use Jest instead of Mocha (which doesn't change much). @brentvatne, do you have an opinion on testing framework? I'm very much in favor of adding tests to this library.
I deliberately used transform-flow-comments
, rather than stripping the flow types out, so they should still be there (although I don't use Flow, so I can't be sure it all still works as intended - you could test it with the prebuilt version on my dist
branch).
I mostly went with Mocha out of familiarity (although I generally choose it on projects for its light weight), but as you say, it's an easy change if there's a project preference for Jest.
Ah, thanks, @jamespic. I just figured it was using the transform-flow-strip-types plugin. It might be better to separate the exported flow types into an index.js.flow file and then we can strip the types through babel. That should work for Flow consumers and make index.js a bit smaller. I'm fine to take this approach to start given that it's already done.
I prefer Jest but I'm totally OK with Mocha for now also, better some tests than none, thanks! Also agree re: @pbomb's comments above re: exporting from an index.js.flow file.
@pbomb - I changed it over to use index.js.flow and pushed version 1.1.1
Sounds good. I'll see about converting the tests to Jest.
Hi,
There are a couple of changes that we needed to make to make this usable on our project:
There are no changes to
index.js
, but I moved it tosrc
, to simplify transpilation.