This Kata will be done from scratch. The main goal of this exercise is to understand the Transformation Priority Premise (TPP). Combining the use of TDD and learnings from the previous exercises, the attendees will reach a clear and simple solution.
- Estimated time: 2 hour
- Format: Pairs
You write a class called Wrapper, that has a single static function named wrap that takes two arguments, a string, and a column number. The function returns the string, but with line breaks inserted at just the right places to make sure that no line is longer than the column number. You try to break lines at word boundaries. Like a word processor, break the line by replacing the last space in a line with a newline.
npm run test
npm run build
Serve index.html file via a local webserver. IntelliJ and other IDEs provide you with a built-in lightweight web server for hmtl files, thus, you may just launch the browser from the IDE.