Closed rafaelespinoza closed 3 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.
I see that sncrypto is on npm, but is there a repo anywhere?
Yup: https://github.com/standardnotes/sncrypto. Although this lib is also undergoing some heavy refactors as part of the 004 restructure.
Hi @rafaelespinoza,
we have a test suite running on CI now (ref: https://github.com/standardnotes/snjs/pull/158)
hope this helps! :)
Closing the issue. If you feel it needs reopening, please don't hesitate to do so.
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:
node ./test-server.js
localhost:9001
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.