Restore circuit drag placement
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { describe, it } from "node:test";
|
||||
import {
|
||||
getAdjacentInsertionSortOrder,
|
||||
getInsertionSortOrder,
|
||||
isGridInsertionRowType,
|
||||
resolveGridInsertionIntent,
|
||||
@@ -89,5 +90,26 @@ describe("circuit grid insertion", () => {
|
||||
assert.equal(getInsertionSortOrder(entries, "c"), 40);
|
||||
assert.equal(getInsertionSortOrder(entries), 40);
|
||||
assert.equal(getInsertionSortOrder([], "missing"), 10);
|
||||
assert.equal(
|
||||
getAdjacentInsertionSortOrder(entries, "a", "before"),
|
||||
0
|
||||
);
|
||||
assert.equal(
|
||||
getAdjacentInsertionSortOrder(entries, "b", "before"),
|
||||
15
|
||||
);
|
||||
assert.equal(
|
||||
getAdjacentInsertionSortOrder(entries, "b", "after"),
|
||||
25
|
||||
);
|
||||
assert.throws(
|
||||
() =>
|
||||
getAdjacentInsertionSortOrder(
|
||||
entries,
|
||||
"missing",
|
||||
"before"
|
||||
),
|
||||
/nicht gefunden/
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user