danwallach / ElectionGuard-TypeScript

TypeScript implementation of ElectionGuard (subset for ballot encryption)
MIT License
8 stars 0 forks source link

Make async elgamal work #25

Closed danwallach closed 2 years ago

danwallach commented 2 years ago

Lots of effort to get async encryption working, but now it all seems happy. Some of the nasty problems included:

I'm nowhere near sure that we're bug-for-bug compatible with the Python code, but at least we're kinda sorta actually working.

shreyasminocha commented 2 years ago

but for some reason the afterAll part was executing before the tests were complete, resulting in some complaints from Jest. (Why? Unclear.)

Figured it out: fast-check expects you to await fc.assert when asserting and async property.

danwallach commented 2 years ago

Cool. Async stuff in TypeScript can be wildly non-obvious.