chai api tests