Remove unwanted chars from test comparison string

This commit is contained in:
gconsidine
2017-08-04 17:17:40 -04:00
parent 3fb6ddd949
commit 2fda94e877

View File

@@ -21,14 +21,14 @@ describe('parseStdoutService', () => {
describe('prettify()', () => { describe('prettify()', () => {
it('returns lines of stdout with styling classes', () => { it('returns lines of stdout with styling classes', () => {
let line = "[0;32mok: [host-00]", let line = "[0;32mok: [host-00]",
styledLine = '<span class="ansi32">ok: [host-00]</span>'; styledLine = '<span class="ansi32">ok: [host-00]</span>';
expect(parseStdoutService.prettify(line)).toBe(styledLine); expect(parseStdoutService.prettify(line)).toBe(styledLine);
}); });
it('can return lines of stdout without styling classes', () => { it('can return lines of stdout without styling classes', () => {
let line = "[0;32mok: [host-00]", let line = "[0;32mok: [host-00][0m",
unstyled = "unstyled", unstyled = "unstyled",
unstyledLine = 'ok: [host-00]'; unstyledLine = 'ok: [host-00]';
expect(parseStdoutService.prettify(line, unstyled)).toBe(unstyledLine); expect(parseStdoutService.prettify(line, unstyled)).toBe(unstyledLine);
}); });