refactoring
This commit is contained in:
@@ -16,7 +16,7 @@ function fakeNode(attributes) {
|
||||
};
|
||||
}
|
||||
|
||||
function loadEditorFactory() {
|
||||
async function loadEditorFactory() {
|
||||
global.Element = class Element {};
|
||||
global.document = {
|
||||
currentScript: null,
|
||||
@@ -30,12 +30,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("back from a second nested submap returns exactly one map level", () => {
|
||||
const factory = loadEditorFactory();
|
||||
test("back from a second nested submap returns exactly one map level", async () => {
|
||||
const factory = await loadEditorFactory();
|
||||
const map = {
|
||||
onSelection() {},
|
||||
onActivation() {},
|
||||
|
||||
Reference in New Issue
Block a user