Library Client side test with local web server

I’m starting in JavaScript test environment. There are a lot of tools out there and I don’t really know what to chose for my needs.

I’m creating a library to download/upload files from browser with encryption feature.

I’ll the example of the upload test here. I need to test the upload function with a local server to upload the file then compare this file to the original one / decrypt it if the file is encrypted during the process to compare hashes.

I couldn’t find a simple way to actually run browser test and nodejs tests within the same test.

I came to the solution of running my server before launching the client and then send the results through http requests.

Is it a good test architecture or is there any better solution?

Thank you for your attention