Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Debug opt, test coverage, and a better embed conditional #7

Merged

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Jan 3, 2019

  1. Adds the debug option, no output otherwise.
  2. Tests! And 100% coverage, because why not? Didn't do anything for gatsby-browser.js, since I'm not sure how best to test that.
  3. I found that it was doing the embed when I had a link in a paragraph, like this https://twitter.com/... is a tweet, which broke things, so I updated the AST conditional checking.

Otherwise it does really wierd things to inline links to tweets, which
looks pretty bad.
With 100% coverage, just for bonus points.

TODO: Still need tests for the gatsby-browser.js file, not sure the best
way to go about that.  Some kind of browser shim thing?
I just realized that when/if I change my twitter handle, it'll break
tests for this module.  Oops!  Fix that by trimming the string to just
the beginning part.
@jmolivas jmolivas merged commit adf0d8b into octahedroid:master Jan 9, 2019
@jmolivas
Copy link
Contributor

jmolivas commented Jan 9, 2019

Thanks for the PR @isaacs

Tagging a new release in a few.

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

Successfully merging this pull request may close these issues.

None yet

2 participants