casthewiz / noh

Add some character to your unit testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arguments for function being tested

2016rshah opened this issue · comments

I think it would be useful to be able to pass in the function's parameters in the function call rather than having to create a function and run the function with the parameter.

So rather than doing

noh.wearNoh(function, expectedValue)(inputParamter)

you could do

noh.wearNoh(function, inputParameter, expectedValue)

Maybe if you don't want to add that to the wearNoh function, you could create a new function called something like ohNoh that would be used like no.ohNoh(function, inputParameter, expectedValue)

I really like the idea of adding a new function - the use case I envisioned for wearNoh was one where you could test multiple inputs for one expected value. I definitely see the value in what you're suggesting!

Sounds great! Let me know if you would like any help

Added ohNoh(function, inputParameter, expectedValue) as a function within the package - instead of wrapping the method to generate a unit test function, it just runs and displays output. This might change; I have to evaluate the general direction I want the test suite to take.