Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code should be <pre>'d #24

Closed
joscha opened this issue Jul 24, 2018 · 6 comments
Closed

code should be <pre>'d #24

joscha opened this issue Jul 24, 2018 · 6 comments

Comments

@joscha
Copy link

joscha commented Jul 24, 2018

When running a test that outputs things like:
web__build_editor__20276

for a test failure, this output gets mangled in the summary:
web__build_editor__20276

I suspect a missing <code><pre class="diff"></pre></code> somewhere.

@tessereth
Copy link
Contributor

Hm, that's interesting. Any chance you can give a sample junit/tap output file so I can test it out?

@joscha
Copy link
Author

joscha commented Jul 25, 2018

That's the junit.xml generated by jest:

<testsuites name="jest editor tests" tests="8772" failures="1" time="174.01">
  <testsuite name="HeaderStore" errors="0" failures="1" skipped="0" timestamp="2018-07-25T03:01:53" time="0.678" tests="7">
    <testcase classname="Header › matches snapshot" name="Header › matches snapshot" time="0.03">
      <failure>Error: expect(value).toMatchSnapshot()

Received value does not match stored snapshot &quot;Header matches snapshot 1&quot;.

- Snapshot
+ Received

@@ -3,11 +3,11 @@
  &gt;
    &lt;nav
      class=&quot;startGroup&quot;
    &gt;
      &lt;a
-       class=&quot;base anchor button booo homeLink&quot;
+       class=&quot;base anchor button linkButton homeLink&quot;
        href=&quot;/&quot;
      &gt;
        &lt;span
          class=&quot;text&quot;
        &gt;
    at Object.toMatchRenderedSnapshot (/build/web/tools/jest/matchers/to_match_rendered_snapshot.ts:9:25)
    at Object.throwingMatcher [as toMatchRenderedSnapshot] (/build/web/node_modules/expect/build/index.js:316:33)
    at Object.it (/build/web/src/pages/editor/header/tests/header.tests.tsx:76:9)
    at Object.asyncFn (/build/web/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
    at resolve (/build/web/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
    at new Promise (&lt;anonymous&gt;)
    at mapper (/build/web/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
    at promise.then (/build/web/node_modules/jest-jasmine2/build/queue_runner.js:87:41)</failure>
    </testcase>
  </testsuite>
</testsuites>

@joscha
Copy link
Author

joscha commented Jul 25, 2018

looking at the haml files it might not be a missing pre, but some other logic in the BK annotations that treats the - and + at the beginning of the line as bullets. And then additionally I think we would want to decode HTML entities in failures.

tessereth pushed a commit that referenced this issue Jul 25, 2018
tessereth pushed a commit that referenced this issue Jul 25, 2018
@tessereth
Copy link
Contributor

Thanks for providing the example! It looks like this is markdown renderer fun again. When I run the generated markdown through kramdown it generates correct markup:

screen shot 2018-07-25 at 3 15 37 pm

But when I push it to buildkite I get what you get. Buildkite recently changed markdown renderer so while I had workarounds for Redcarpet now I need to go figure out what I need for cmark-cfm.

Markdown, not always as "standard" as you might hope...

@tessereth
Copy link
Contributor

Should be fixed in v1.5.0. Thanks for the bug report!

@joscha
Copy link
Author

joscha commented Jul 25, 2018

\o/ thank you for the fast fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants