Fix tests
This commit is contained in:
parent
42a16ee062
commit
a52875c83c
6 changed files with 9 additions and 10 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
preset: "ts-jest/presets/js-with-babel-esm"
|
preset: "ts-jest"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -106,10 +106,9 @@ export class ObsidianFileSystemOperations implements FileSystemOperations {
|
||||||
view.editor.setValue(result.text);
|
view.editor.setValue(result.text);
|
||||||
|
|
||||||
const selections = [];
|
const selections = [];
|
||||||
const resultCursors = result.cursors ?? [];
|
for (let i = 0; i < result.cursors.length / 2; i++) {
|
||||||
for (let i = 0; i < resultCursors.length / 2; i++) {
|
const from = result.cursors[2 * i];
|
||||||
const from = resultCursors[2 * i];
|
const to = result.cursors[2 * i + 1];
|
||||||
const to = resultCursors[2 * i + 1];
|
|
||||||
const { line: fromLine, column: fromColumn } =
|
const { line: fromLine, column: fromColumn } =
|
||||||
positionToLineAndColumn(result.text, from.position);
|
positionToLineAndColumn(result.text, from.position);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
preset: "ts-jest/presets/js-with-babel-esm"
|
preset: "ts-jest"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "webpack watch --mode development",
|
"dev": "webpack watch --mode development",
|
||||||
"build": "webpack --mode production",
|
"build": "webpack --mode production",
|
||||||
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"byte-base64": "^1.1.0",
|
"byte-base64": "^1.1.0",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import assert from "assert";
|
import * as assert from "assert";
|
||||||
|
|
||||||
export function assertSetContainsExactly<T>(set: Set<T>, ...values: T[]): void {
|
export function assertSetContainsExactly<T>(set: Set<T>, ...values: T[]): void {
|
||||||
assert(
|
assert(
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
preset: "ts-jest/presets/js-with-babel-esm"
|
preset: "ts-jest"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue