Fix tests

This commit is contained in:
Andras Schmelczer 2025-07-13 09:51:18 +01:00
commit a52875c83c
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
6 changed files with 9 additions and 10 deletions

View file

@ -1,3 +1,3 @@
module.exports = {
preset: "ts-jest/presets/js-with-babel-esm"
preset: "ts-jest"
};

View file

@ -106,10 +106,9 @@ export class ObsidianFileSystemOperations implements FileSystemOperations {
view.editor.setValue(result.text);
const selections = [];
const resultCursors = result.cursors ?? [];
for (let i = 0; i < resultCursors.length / 2; i++) {
const from = resultCursors[2 * i];
const to = resultCursors[2 * i + 1];
for (let i = 0; i < result.cursors.length / 2; i++) {
const from = result.cursors[2 * i];
const to = result.cursors[2 * i + 1];
const { line: fromLine, column: fromColumn } =
positionToLineAndColumn(result.text, from.position);