Moved constants from base.js to new file constants.js, eliminating magic...

... numbers in tests.
One thing you could do that might be a little cleaner is to do
var TestResults = require('../../../src/constants.js).TestResults;
then elsewhere you can just do TestResults.ALL_PASS.

Up to you as to whether you change this or not, as you have it is also fine.