npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Testing code in the client folder

Hi there

I’m looking into retrofitting tests into a node app.

I can see how I’d write unit tests to test the functions that are described in the server folder, but I’m struggling to understand how I’d write unit tests for the code in the client folder, as this contains very few functions.

Do you even write unit tests for the client side code? Or is this usually handled by feature testing?

As you may have been able to tell, I know next to nothing about node, so just looking for some advice here.


(This isn’t about npm so I have moved to #community:javascript. Good luck with answers.)