Zaid-Ajaj / Fable.Mocha

Fable library for a proper testing story using different runners such as mocha, standalone browsers and dotnet
MIT License
56 stars 17 forks source link

Asserting and mocking #28

Open padzikm opened 3 years ago

padzikm commented 3 years ago

Hi, mocha is just test runner, but it's lacking jest's asserting and mocking functionality. I didn't find any fable's bindinds to neither chai nor sinon, which are most popular for mocha. What do you propose to use for that essential functionalities?

Zaid-Ajaj commented 3 years ago

Hi @padzikm the library includes assertion functions with a similar API to Expecto which is familiar to many F# developers. I try to stay as much compatible as possible and add more functions as we go.

As for mocking, it is not a common practice in F# so I didn't include any helpers in that aspect. If you have a concrete use-case, I would be happy to look into writing helpers and utility functions for it.