Add test case for this change

This commit is contained in:
confused-Techie 2023-10-09 17:00:54 -07:00
parent 328488d80b
commit 837ca15efc

View File

@ -105,7 +105,7 @@ describe("WrapGuideElement", function() {
for (let i = 0; i < columnCount; i++) {
columns.push(i * 10);
}
atom.config.set("wrap-guide.columns", columns);
waitsForPromise(() => editorElement.getComponent().getNextUpdatePromise());
@ -245,6 +245,19 @@ describe("WrapGuideElement", function() {
expect(wrapGuide).toBeVisible();
});
});
it("leaves alone preferredLineLength if modifyPreferredLineLength is false", () => {
const initial = atom.config.get("editor.preferredLineLength", { scope: editor.getRootScopeDescriptor() });
atom.config.set("wrap-guide.modifyPreferredLineLength", false);
atom.config.set("wrap-guide.columns", [ initial, initial + 10]);
waitsForPromise(() => editorElement.getComponent().getNextUpdatePromise());
runs(() => {
const length = atom.config.get("editor.preferredLineLength", { scope: editor.getRootScopeDescriptor() });
expect(length).toBe(initial);
});
});
});
describe("when the editor's scroll left changes", () => it("updates the wrap guide position to a relative position on screen", function() {