To be more specific, I'm writing an API with Express JS and am trying to figure out what is and isn't worth / possible / feasible to test.
A couple of areas have stumped me. Firstly; code that simply runs things, on their own, this is a snippet from a file I have been wondering about:
var kernel = new Kernel();
kernel.listen();
Internally that method; boots the application, sets up the routing, services, basic application structure and then starts the express application which is hooked into the core of the application I'm making. As a result, testing this seems quite difficult, and I find myself wondering if it's even worth testing. I would essentially simply be testing if things were run, not functionality.
Is this a point where I shouldn't unit test?
One other reason I've been skeptical about testing these kinds of things is because looking at things like the Symfony standard edition, this kind of things doesn't seem to be tested.
Aucun commentaire:
Enregistrer un commentaire