Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to export function from module without nodeunit testing it? #353

Open
mdavis-xyz opened this issue Apr 15, 2018 · 0 comments
Open

How to export function from module without nodeunit testing it? #353

mdavis-xyz opened this issue Apr 15, 2018 · 0 comments

Comments

@mdavis-xyz
Copy link

I've got a few tests scattered throughout multiple files.

Currently I just run nodeunit ., nodeunit then tests them all successfully. Great!

But I want to export a function from one of my files so that another can call it. The problem is that when I run nodeunit . that function now gets called.

How can I run tests on all files? I'm used to python's nose library, which only tests functions that have test in the function name.

Do I need to move all tests into a seperate file to the functionality? I don't want to do that. I like putting tests adjacent to the code they're testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant