Closed vqhuy closed 8 years ago
I added the test harness is eb385719. You should be able to add some tests in addon/test/test-libotr.js
for the libotr.js
changes here. Don't worry about the otr.js
stuff for now.
And let me know if that presents any problems. It's new, so likely some edges to be smoothed out.
Should be able to test the otr.js
stuff as well now ... and canonical testing is in test/
now. The addon/
directory is all symlinks.
I have some troubles in writing tests that call otr.generatePrivateKey
, it seems like there is no ways to delay the execution until this function returns.
You mean, since it's asynchronous? I think you just add a magic done
argument.
See https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/test_utils#Before_and_After
I added a test to demonstrate in 529dee31c10c89513ba0ba6bbb477e28034728e8.
Also, worth asking, how much of this stuff are you still using after the discussion in the email thread?
Also, worth asking, how much of this stuff are you still using after the discussion in the email thread?
For now, only otr. privateKeyFingerprintRaw
and base64 encode & decode functions. Should I remove unused functions?
Should I remove unused functions?
Yeah, let's keep it to what's being used.
Yeah, let's keep it to what's being used.
I updated it in 1cd138ec0d67005c992a4afe02561f6f1e167909. cc @arlolra
I merged part of this in 8cd27e82c9a3836a210500df8256f31417a4cb4b, but I have some questions about the b64 stuff.
I merged the b64 stuff in 50aeb2493906140f32f26ee1d58495214c9e02d3. Changed a few variable names and added some comments.
Thanks Huy!
Thanks, I may try to do something about #78 first, so bear with me.