lukel97 / lsp-test

A functional test framework for LSP servers
BSD 3-Clause "New" or "Revised" License
35 stars 15 forks source link

Add a more general satisfyMaybe helper #45

Closed cocreature closed 5 years ago

cocreature commented 5 years ago

satisfy is a bit akward to use for the same reasons that filter can sometimes be a bit awkward to use: You often have to repeat the same check on the result you get from satisfy.

This PR adds a satisfyMaybe wrapper that acts a bit like mapMaybe and avoids that issue. This also allows us to remove castMsg.

lukel97 commented 5 years ago

Thanks! Also +1 for getting rid of that embarrassing castMsg lol