What values should the nodedirectory hold?

Sorry if this is a silly question - I'm newish to node from a .NET background.

I'm using nodeunit to construct unit tests for my node code in a subfolder called tests.  I'm able to run them via the command line in this folder.  I want to debug a test, so I've created a run configuration, from the NodeUnit default.

There's a field there called 'Nodeunit Module', 4th one down.  I've tried
setting this to both my tests folder under my main project folder - I get an error of 'Cannot find nodeunit module in '/Users/proctor/Projects/Mise/nodejsserver/tests'

So I tried setting both the working directory and node unit module to the parent folder, nodejsserver.  Now I run, but instead of the unit test file I've specified I get the debugger entering my main project.

Does anyone know the values I should be putting in here?  Thanks in advance!

2 comments
Comment actions Permalink

Hello!

'nodeunit module' should be your local nodeunit module home, usually <project-root>/node_modules\nodeunit
Working dir is usually your project directory
Please see the sample project attached



Attachment(s):
nodeunit.zip
0
Comment actions Permalink

Thanks Elena!  I had to add the packages.json file and run install, the npm install hadn't created the node_modules folder.  Working nicely now!

0

Please sign in to leave a comment.