add tests, fix test declaration in package.json, add checkCredentials to exports to make directly testable