Is it possible to pass variables to a mocha test file using gulp or any other method.

What I have is a couple of test files in a /test folder a couple of inputs in a /inputs folders outputs in a /outputs folder

what I want to do is run all the inputs through the functions that are to be tested.

pass those outputs, I think gulp is good idea, to mocha test file, and the /outputs folders outputs to the mocha test files.

add all the mocha files programatically using mocha.addFile( ... )

and lastly run mocha with mocha.run()

essentially I want to pass the function outputs and the outputs in my outputs folder to mocha. Is this even feasible.

any suggestions are more than welcomed thanks.

0 Answers