mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 00:07:30 +09:00
104442 - Part 5: Add another testcase for devtools and note.
This commit is contained in:
parent
0b83f76c35
commit
56411e2633
1 changed files with 18 additions and 0 deletions
|
|
@ -219,4 +219,22 @@ describe("PageError component:", () => {
|
||||||
expect(locationLink3.length).toBe(1);
|
expect(locationLink3.length).toBe(1);
|
||||||
expect(locationLink3.text()).toBe("test3.js:9:4");
|
expect(locationLink3.text()).toBe("test3.js:9:4");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("displays error notes", () => {
|
||||||
|
const message = stubPreparedMessages.get("SyntaxError: redeclaration of let a");
|
||||||
|
|
||||||
|
let wrapper = render(PageError({ message, serviceContainer }));
|
||||||
|
|
||||||
|
const notes = wrapper.find(".error-note");
|
||||||
|
expect(notes.length).toBe(1);
|
||||||
|
|
||||||
|
const note = notes.eq(0);
|
||||||
|
expect(note.find(".message-body").text())
|
||||||
|
.toBe("note: Previously declared at line 2, column 6");
|
||||||
|
|
||||||
|
// There should be the location.
|
||||||
|
const locationLink = note.find(`.message-location`);
|
||||||
|
expect(locationLink.length).toBe(1);
|
||||||
|
expect(locationLink.text()).toBe("test-console-api.html:2:6");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue