summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/new-console-output
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-06-09 23:13:13 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-07-18 22:38:40 -0400
commit147c6d6afa453ca24134353cbf64f2e210776eb4 (patch)
tree61d7e6bfbee663fe9ae2c36c1473a7283b329fbc /devtools/client/webconsole/new-console-output
parent5d1f675acd1c8e92a12e9a59e229d36231f35311 (diff)
downloadUXP-147c6d6afa453ca24134353cbf64f2e210776eb4.tar
UXP-147c6d6afa453ca24134353cbf64f2e210776eb4.tar.gz
UXP-147c6d6afa453ca24134353cbf64f2e210776eb4.tar.lz
UXP-147c6d6afa453ca24134353cbf64f2e210776eb4.tar.xz
UXP-147c6d6afa453ca24134353cbf64f2e210776eb4.zip
104442 - Part 5: Add another testcase for devtools and note.
Diffstat (limited to 'devtools/client/webconsole/new-console-output')
-rw-r--r--devtools/client/webconsole/new-console-output/test/components/page-error.test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/devtools/client/webconsole/new-console-output/test/components/page-error.test.js b/devtools/client/webconsole/new-console-output/test/components/page-error.test.js
index 82ee85011..5bc5fe0f0 100644
--- a/devtools/client/webconsole/new-console-output/test/components/page-error.test.js
+++ b/devtools/client/webconsole/new-console-output/test/components/page-error.test.js
@@ -219,4 +219,22 @@ describe("PageError component:", () => {
expect(locationLink3.length).toBe(1);
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");
+ });
});