part way to fixed 'npm test' functionality