Bug 1315242 - Part 5: Add a testcase for location in Evaluation Result. r=bgrins
authorTooru Fujisawa <arai_a@mac.com>
Fri, 11 Nov 2016 01:06:26 +0900
changeset 352146 fa67f98c5ffd878b667226c589e819d3c1c91fea
parent 352145 ad6fa81a22987ecd04e0652c2241ed0aa3c5e1b0
child 352147 4e1adcac2cfd09116a522c79a4baafc02d26fee3
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1315242
milestone52.0a1
Bug 1315242 - Part 5: Add a testcase for location in Evaluation Result. r=bgrins
devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js
--- a/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js
+++ b/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js
@@ -67,9 +67,18 @@ describe("EvaluationResult component:", 
     const indent = 10;
     let wrapper = render(EvaluationResult({ message, indent}));
     expect(wrapper.find(".indent").prop("style").width)
         .toBe(`${indent * INDENT_WIDTH}px`);
 
     wrapper = render(EvaluationResult({ message}));
     expect(wrapper.find(".indent").prop("style").width).toBe(`0`);
   });
+
+  it("has location information", () => {
+    const message = stubPreparedMessages.get("1 + @");
+    const wrapper = render(EvaluationResult({ message }));
+
+    const locationLink = wrapper.find(`.message-location`);
+    expect(locationLink.length).toBe(1);
+    expect(locationLink.text()).toBe("debugger eval code:1:4");
+  });
 });