fixes test harnesses; now runs properly via npm test or grunt test