standardnotes / snjs

Core JavaScript logic shared by all Standard Notes clients.
32 stars 15 forks source link

Test suite, CI #5

Closed rafaelespinoza closed 3 years ago

rafaelespinoza commented 4 years ago

It would be really useful if this library's test suite was available for continuous integration environments, but it seems that the browser dependency makes this difficult. In particular, it would be a great tool for testing a StandardNotes backend implementation.

the problem

At the moment, it seems that the test suite can only be run by:

The dependence on a browser makes it difficult to use in continuous integration.

some affected projects

There are a few server-side implementations, in addition to the official syncing-server such as:

Some of these have test suites, but does it even matter if the client does not work?

ideas for solution

Could the test suite be set up to use node? If the execution environment shifted to node, then it would be easier to run the test suite along the side of any of the aforementioned syncing servers. A docker image and one location to set a server URL in the test would also be really nice to have.

moughxyz commented 4 years ago

We need a browser because we use WebCrypto in our clients to perform crypto operations. SNJS is dependent on sn-crypto, which includes the WebCrypto code. You can potentially swap this out for Node-based crypto by subclassing, but this might require some work to support.

rafaelespinoza commented 4 years ago

I see that sncrypto is on npm, but is there a repo anywhere?

moughxyz commented 4 years ago

Yup: https://github.com/standardnotes/sncrypto. Although this lib is also undergoing some heavy refactors as part of the 004 restructure.

karolsojko commented 3 years ago

Hi @rafaelespinoza,

we have a test suite running on CI now (ref: https://github.com/standardnotes/snjs/pull/158)

hope this helps! :)

karolsojko commented 3 years ago

Closing the issue. If you feel it needs reopening, please don't hesitate to do so.