Migrated from chai-spies to sinon