Update tests, and add npm test