`;
sourceObj = new DoenetSourceObject(source);
{
- let { cursorPosition, node } = sourceObj.elementAtOffset(7);
+ let { cursorPosition, node } = sourceObj.elementAtOffsetWithContext(7);
expect(cursorPosition).toEqual("openTag");
expect(node).toMatchObject({ type: "element", name: "a" });
}
@@ -241,100 +241,12 @@ describe("DoenetSourceObject", () => {
source = `<`;
sourceObj = new DoenetSourceObject(source);
{
- let { cursorPosition, node } = sourceObj.elementAtOffset(1);
+ let { cursorPosition, node } = sourceObj.elementAtOffsetWithContext(1);
expect(cursorPosition).toEqual("unknown");
expect(node).toEqual(null);
}
});
- it("Can find named referents", () => {
- let source: string;
- let sourceObj: DoenetSourceObject;
-
- source = `
-
-