|
| 1 | +jest.mock( |
| 2 | + 'electron', |
| 3 | + () => { |
| 4 | + return { |
| 5 | + remote: { |
| 6 | + app: { |
| 7 | + getPath: jest.fn().mockReturnValue('.') |
| 8 | + } |
| 9 | + } |
| 10 | + } |
| 11 | + }, |
| 12 | + { virtual: true } |
| 13 | +) |
| 14 | + |
1 | 15 | import Markdown from 'browser/lib/markdown' |
2 | 16 | import markdownFixtures from '../fixtures/markdowns' |
3 | 17 |
|
@@ -73,32 +87,32 @@ test('Markdown.render() should render footnote correctly', () => { |
73 | 87 | expect(rendered).toMatchSnapshot() |
74 | 88 | }) |
75 | 89 |
|
76 | | -test('Markdown.render() should renders [TOC] placholder correctly', t => { |
| 90 | +test('Markdown.render() should renders [TOC] placholder correctly', () => { |
77 | 91 | const rendered = md.render(markdownFixtures.tocPlaceholder) |
78 | | - t.snapshot(rendered) |
| 92 | + expect(rendered).toMatchSnapshot() |
79 | 93 | }) |
80 | 94 |
|
81 | | -test('Markdown.render() should render PlantUML MindMaps correctly', t => { |
| 95 | +test('Markdown.render() should render PlantUML MindMaps correctly', () => { |
82 | 96 | const rendered = md.render(markdownFixtures.plantUmlMindMap) |
83 | 97 | expect(rendered).toMatchSnapshot() |
84 | 98 | }) |
85 | 99 |
|
86 | | -test('Markdown.render() should render PlantUML Gantt correctly', t => { |
| 100 | +test('Markdown.render() should render PlantUML Gantt correctly', () => { |
87 | 101 | const rendered = md.render(markdownFixtures.plantUmlGantt) |
88 | 102 | expect(rendered).toMatchSnapshot() |
89 | 103 | }) |
90 | 104 |
|
91 | | -test('Markdown.render() should render PlantUML WBS correctly', t => { |
| 105 | +test('Markdown.render() should render PlantUML WBS correctly', () => { |
92 | 106 | const rendered = md.render(markdownFixtures.plantUmlWbs) |
93 | 107 | expect(rendered).toMatchSnapshot() |
94 | 108 | }) |
95 | 109 |
|
96 | | -test('Markdown.render() should render PlantUML Umls correctly', t => { |
| 110 | +test('Markdown.render() should render PlantUML Umls correctly', () => { |
97 | 111 | const rendered = md.render(markdownFixtures.plantUmlUml) |
98 | 112 | expect(rendered).toMatchSnapshot() |
99 | 113 | }) |
100 | 114 |
|
101 | | -test('Markdown.render() should render PlantUML Ditaa correctly', t => { |
| 115 | +test('Markdown.render() should render PlantUML Ditaa correctly', () => { |
102 | 116 | const rendered = md.render(markdownFixtures.plantUmlDitaa) |
103 | 117 | expect(rendered).toMatchSnapshot() |
104 | 118 | }) |
0 commit comments