qgustavor / mega

Unofficial JavaScript SDK for MEGA
https://mega.js.org/
MIT License
161 stars 43 forks source link

Fixing tests #133

Closed qgustavor closed 1 year ago

qgustavor commented 1 year ago

Fixes #93, an issue related to crypto that showed up in tests and fixed Deno tests.

To run all tests in Deno some of build.js code had to be duplicated in test-runner.mjs. That was not a lot of duplicated code, but is good to consider making build.js also handle building test code to avoid duplication.

An issue showed up in tests: the browser version of prepareKey was wrong. Node 10 removed noAssert support from Buffer's write and read functions, thus a fix was need. An incorrect fix was implemented, instead password should be padded.

There was an issue in mega-mock making Deno tests never finish. It was been fixed and updated.