nbb

Oleh K. 2024-11-14T14:41:27.432409Z

it's a breath to develope with nbb. But I'm stuck on tests, seems with-redefs doesn't work if the inner code uses promises (promesa.core). Is there a way to workaround that?

borkdude 2024-11-14T14:45:14.862229Z

write an async version of with-redefs? ;)

2024-11-14T15:04:38.408969Z

Iโ€™ve been using https://github.com/logseq/logseq/blob/4103b1fc935e4edcb7823b98905400dd8a33cba5/src/test/frontend/test/helper.clj#L35-L51 with cljs tests for awhile with examples in https://github.com/logseq/logseq/blob/master/src/test/frontend/handler/paste_test.cljs. Havenโ€™t tried it with nbb yet but should work

Oleh K. 2024-11-14T15:44:55.309639Z

Oh, thank you both!

Oleh K. 2024-11-14T16:52:51.176199Z

It appears there is also promesa.core/with-redefs ๐Ÿ˜…

borkdude 2024-11-14T16:56:56.079499Z

nice :)

borkdude 2024-11-14T16:57:05.271729Z

it also works in nbb, just tested :)

2024-11-14T17:11:41.033959Z

Thanks! Just replaced my test helper. p/with-redefs is easier to use, better supported and know I now it works in nbb ๐Ÿ™‚

๐ŸŽ‰ 1