(string: string, width: number)
| 2 | import { wrapSpannedStringByWord } from './wrapSpannedStringByWord'; |
| 3 | |
| 4 | function wrapString(string: string, width: number): string[] { |
| 5 | return Array.from( |
| 6 | wrapSpannedStringByWord(T().appendString(string), width) |
| 7 | ).map((formattedString) => formattedString.getString()); |
| 8 | } |
| 9 | |
| 10 | test('single line', () => { |
| 11 | expect(wrapString('one two three', 100)).toEqual(['one two three']); |
no test coverage detected