-
|
I have been working on ekg-denote, a package which export/import between ekg notes and denotes. I have been struggling to write good ert test cases. Any guidance on the same is much appreciated? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
Exciting to see the progress here! To have easier testing, it's nice have isolated functions that just do the transformation to and from denote, as well as any other interesting logic to test. So, keep the basic logic simple and put the actual file reading and writing there, and do most of the work in testable functions. I think ekg-logseq-tests show some of this, although I could have done a better job in extracting more of the logic to testable classes. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks. This is helpful. Let me do that and do some testing. |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the long period of inactivity on my side, @jayrajput, I was busy with a new job. I've renamed the develop branch to |
Beta Was this translation helpful? Give feedback.
ekg-deftestdefined in theekg-test-utils.elis interesting. It creates a temporary ekg-db file and was what I was looking for my use case. I probably needs something which similarly wraps the denote directory.