1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Chore: Disabled not very useful test that can fail easily as we add more sort fields

This commit is contained in:
Laurent Cozic 2024-04-05 12:19:57 +01:00
parent 2e2a2b3193
commit 28b8818c4d

View File

@ -1,4 +1,4 @@
import { notesSortOrderFieldArray, notesSortOrderNextField, setNotesSortOrder } from './notesSortOrderUtils'; import { notesSortOrderNextField, setNotesSortOrder } from './notesSortOrderUtils';
import Setting from '@joplin/lib/models/Setting'; import Setting from '@joplin/lib/models/Setting';
const { shimInit } = require('@joplin/lib/shim-init-node.js'); const { shimInit } = require('@joplin/lib/shim-init-node.js');
@ -9,11 +9,13 @@ describe('notesSortOrderUtils', () => {
Setting.autoSaveEnabled = false; Setting.autoSaveEnabled = false;
}); });
it('should always provide the same ordered fields', async () => { // Disabling as the test doesn't seem very useful.
const expected = ['user_updated_time', 'user_created_time', 'title', 'order'];
expect(notesSortOrderFieldArray()).toStrictEqual(expected); // it('should always provide the same ordered fields', async () => {
expect(notesSortOrderFieldArray()).toStrictEqual(expected); // const expected = ['user_updated_time', 'user_created_time', 'title', 'order'];
}); // expect(notesSortOrderFieldArray()).toStrictEqual(expected);
// expect(notesSortOrderFieldArray()).toStrictEqual(expected);
// });
it('should provide the next field cyclically', async () => { it('should provide the next field cyclically', async () => {
expect(notesSortOrderNextField('user_updated_time')).toBe('user_created_time'); expect(notesSortOrderNextField('user_updated_time')).toBe('user_created_time');