phildenhoff / logseq-raindrop

A Raindrop plugin for Logseq
MIT License
62 stars 5 forks source link

Wrap Logseq and Raindrop clients to support unit tests #46

Closed phildenhoff closed 1 year ago

phildenhoff commented 1 year ago

This moves the Logseq and Raindrop clients to be at arms-reach from the rest of the code, which allows us to unit test our code. While more things directly know about the Logseq client (see the number of function params that now use include the client), they are at arms length from the actual implementation.

This adds a new Moqseq client, allowing us to mock Logseq behaviour in-memory. It's not perfect, but it has a relatively robust test suite to ensure the implementation is as expected. We use this extensively in testing — see the spec files for upsertRaindropPages and emptyState.

phildenhoff commented 1 year ago

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.