refactoring
This commit is contained in:
@@ -74,7 +74,7 @@ function fakeLink(attributes) {
|
||||
};
|
||||
}
|
||||
|
||||
function loadEditorFactory() {
|
||||
async function loadEditorFactory() {
|
||||
global.Element = class Element {};
|
||||
global.document = {
|
||||
currentScript: null,
|
||||
@@ -88,12 +88,12 @@ function loadEditorFactory() {
|
||||
clearTimeout,
|
||||
requestAnimationFrame: (callback) => callback()
|
||||
};
|
||||
require("../static/cmap/cmap-racket-wiki.js");
|
||||
await import("../static/cmap/cmap-racket-wiki.js");
|
||||
return global.window.RacketWikiCmap;
|
||||
}
|
||||
|
||||
test("a dragged connector endpoint survives collapsing and expanding its submap", () => {
|
||||
const factory = loadEditorFactory();
|
||||
test("a dragged connector endpoint survives collapsing and expanding its submap", async () => {
|
||||
const factory = await loadEditorFactory();
|
||||
const links = [];
|
||||
const map = {
|
||||
onSelection() {},
|
||||
|
||||
Reference in New Issue
Block a user