(name, before, after)
| 4 | describe('build', function() { |
| 5 | describe('ansi_to_html', function() { |
| 6 | function expect(name, before, after) { |
| 7 | it(name, function() { |
| 8 | assert.equal(build.ansi_to_html(before), after); |
| 9 | }); |
| 10 | } |
| 11 | expect('passes through unchanged text', 'something', 'something'); |
| 12 | expect('strips unknown codes', '\x1b[1;2;3fblah', 'blah'); |
| 13 | expect('bolds text', 'a \x1b[1mbold\x1b[0m plan', 'a <em>bold</em> plan'); |