foundation for js api unit testing