Friday 11 March 2016

How to set up test file

This may be a dumb question. The situation is that a Node app was created and then put into a Vagrant box (so that it can be easily passed around to members of the team). So the app works when you do "vagrant up" and you can see the app via localhost in your browser.The app needs unit tests run against it. The app contains a whole bunch of different js files. Now let's say we create a file to contain the unit tests called "testfile.js". How will "testfile.js" be able to access all of the functions inside the app? What needs to be done?The testing will either use Painless(which comes prepackaged with Sinon and Chai) or Tape + Sinon + Chai + any other needed npm modules (possibly proxyquire).Any help is much appreciated!

Submitted March 11, 2016 at 11:41AM by the_tester888

No comments:

Post a Comment