mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
19 lines
513 B
TypeScript
19 lines
513 B
TypeScript
import { renderErrorBlock } from './makeDiscourseDebugUrl';
|
|
|
|
describe('makeDiscourseDebugUrl', () => {
|
|
|
|
it('should render errors', () => {
|
|
const errors = [
|
|
new Error('First'),
|
|
new Error('Second'),
|
|
'Just a plain string',
|
|
];
|
|
|
|
const actual = renderErrorBlock(errors);
|
|
expect(actual.startsWith('```\nError: First\n at Object')).toBe(true);
|
|
expect(actual.includes(')\n\nError: Second\n at Object')).toBe(true);
|
|
expect(actual.endsWith(')\n\nJust a plain string\n```')).toBe(true);
|
|
});
|
|
|
|
});
|