1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Tools: Retry CodeMirror mobile tests when they fail

This commit is contained in:
Laurent Cozic 2023-08-24 15:34:00 +01:00
parent 13b7e3657b
commit 97938ec272
5 changed files with 14 additions and 0 deletions

View File

@ -4,6 +4,9 @@ import createEditor from './testUtil/createEditor';
import { toggleList } from './markdownCommands';
describe('markdownCommands.bulletedVsChecklist', () => {
jest.retryTimes(2);
const bulletedListPart = '- Test\n- This is a test.\n- 3\n- 4\n- 5';
const checklistPart = '- [ ] This is a checklist\n- [ ] with multiple items.\n- [ ] ☑';
const initialDocText = `${bulletedListPart}\n\n${checklistPart}`;

View File

@ -6,6 +6,9 @@ import createEditor from './testUtil/createEditor';
import { blockMathTagName } from './markdownMathParser';
describe('markdownCommands', () => {
jest.retryTimes(2);
it('should bold/italicize everything selected', async () => {
const initialDocText = 'Testing...';
const editor = await createEditor(

View File

@ -6,6 +6,9 @@ import { ListType } from '../types';
import createEditor from './testUtil/createEditor';
describe('markdownCommands.toggleList', () => {
jest.retryTimes(2);
it('should remove the same type of list', async () => {
const initialDocText = '- testing\n- this is a `test`\n';

View File

@ -27,6 +27,8 @@ const findNodesWithName = (editor: EditorState, nodeName: string) => {
describe('markdownMathParser', () => {
jest.retryTimes(2);
it('should parse inline math that contains space characters, numbers, and symbols', async () => {
const documentText = '$3 + 3$';
const editor = await createEditorState(documentText, [inlineMathTagName, 'number']);

View File

@ -5,6 +5,9 @@ import { Text as DocumentText, EditorSelection, EditorState } from '@codemirror/
import { indentUnit } from '@codemirror/language';
describe('markdownReformatter', () => {
jest.retryTimes(2);
const boldSpec: RegionSpec = RegionSpec.of({
template: '**',
});