allow test to run from file url
add npm test