Вот как я это сделал:
$string = "I appreciate your service & idea to provide the branded toys at a fair rent price. This is really a wonderful to watch the kid not just playing with variety of toys but learning faster compare to the other kids who are not using the BooksandBeyond service. We wish you all the best";
print_r(substr($string, 0, strpos(wordwrap($string, 250), "\n")));
Проблема заключалась в том, что я не выполнял вызов, когда выполнил свой запрос, в результате которого соединение оставалось открытым, а затем заканчивался тайм-аут, поскольку запрос не был закрыт
test("DELETE /questions/:qID", done => {
jest.setTimeout(10000);
server
// /questions/5c7899a24552624a5b9c7f35?_method=DELETE
.delete(`/questions/${aQuestionId}`)
.expect(200, done); <= call done
});