For testing undo, you can just add the following after this line:

```coffee
editor.undo()
expect(buffer.lineForRow(0)).toBe "console.log("Hello World");"
expect(buffer.lineForRow(1)).toBe 'console.log('Hello World');
```