complete test coverage for library.js