{"id":6061,"date":"2024-04-11T12:00:13","date_gmt":"2024-04-11T16:00:13","guid":{"rendered":"https:\/\/ionic.io\/blog\/?p=6061"},"modified":"2024-04-11T12:00:17","modified_gmt":"2024-04-11T16:00:17","slug":"testing-stencil-components-with-ease-using-webdriverio","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio","title":{"rendered":"Testing Stencil Components with Ease using WebdriverIO"},"content":{"rendered":"\n<p>If you\u2019re a developer building Stencil-based component libraries used by potentially dozens of apps, you must ensure that your Stencil components work the way you expect. To help verify that components work correctly, Stencil offers both unit testing and end-to-end testing capabilities. Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is <a href=\"https:\/\/webdriver.io\">WebdriverIO<\/a>, a browser and mobile automation test framework for Node.js that allows you to run component and end-to-end tests across all browsers.<\/p>\n\n\n\n<p>We\u2019re big fans of WebdriverIO because of its cross-browser support, real user interaction (i.e., close to native user-triggered interactions), web platform support, and the ability to run tests in the same environments your users use.<\/p>\n\n\n\n<p>Here\u2019s a brief tour of using WebdriverIO to test your Stencil components.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Unit Testing<\/h2>\n\n\n\n<p>WebdriverIO makes it easy to unit test components and app utility functions in the browser. WebdriverIO provides a helper package for rendering a component into a DOM tree, which resembles how your component is used in an actual application.<\/p>\n\n\n\n<p>Given the following component:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-typescript\">\/\/ \/src\/components\/my-component\/my-component.tsx\nimport { Component, Prop, h } from &#039;@stencil\/core&#039;;\n\n@Component({\n  tag: &#039;my-component&#039;,\n  styleUrl: &#039;my-component.css&#039;,\n  shadow: true,\n})\nexport class MyComponent {\n  \/**\n   * The first name\n   *\/\n  @Prop() first: string;\n\nprivate getName(): string {\n    return (\n      &lt;span&gt;{this.first}&lt;\/span&gt;\n    );\n  }\n\n  render() {\n    return &lt;div&gt;Hello, World! I&#039;m {this.getName()}&lt;\/div&gt;;\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>We use the `render` method to render the component in the browser and then verify it\u2019s outputting the correct text:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-typescript\">\/\/ \/src\/components\/my-component\/my-component.test.tsx\nimport { h } from &#039;@stencil\/core&#039;;\nimport { $, expect } from &#039;@wdio\/globals&#039;;\nimport { render } from &#039;@wdio\/browser-runner\/stencil&#039;;\n\nimport { MyComponent } from &#039;.\/my-component.js&#039;;\n\ndescribe(&#039;my-component&#039;, () =&gt; {\n  it(&#039;renders the component correctly&#039;, async () =&gt; {\n    render({\n      components: [MyComponent],\n      template: () =&gt; &lt;my-component first=&quot;Liam&quot; \/&gt;\n    });\n\n    const component = $(&#039;my-component&#039;);\n    await expect(component).toHaveText(`Hello, World! I&#039;m Liam`);\n  });\n});\n<\/code><\/pre>\n\n\n\n<p>More details on unit testing can <a href=\"https:\/\/stenciljs.com\/docs\/testing\/webdriverio\/unit-testing\">be found here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mocking<\/h2>\n\n\n\n<p>WebdriverIO supports file-based module mocking and mocking of entire dependencies of your project. To create a mock, either create a file with the name of the module you would like to mock in the `__mocks__` directory or mock the file directly as part of your test:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-typescript\">import { mock, fn } from &#039;@wdio\/browser-runner&#039;;\nimport { format } from &#039;.\/utils\/utils.ts&#039;;\n\n\/\/ mock files within the project\nmock(&#039;.\/utils\/utils.ts&#039;, () =&gt; ({\n    format: fn().mockReturnValue(42);\n}));\n\/\/ mock whole modules and replace functionality with what is defined in `.\/__mocks__\/leftpad.ts`\nmock(&#039;leftpad&#039;);\n\nconsole.log(format()); \/\/ returns `42`\n<\/code><\/pre>\n\n\n\n<p>More details on mocking with WebdriverIO can be found <a href=\"https:\/\/stenciljs.com\/docs\/testing\/webdriverio\/mocking\">in the Stencil docs<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Visual Testing<\/h2>\n\n\n\n<p>WebdriverIO supports visual testing capabilities (image comparisons on screens, elements, or a whole page) out of the box. To use it, you save a baseline image for a screen\/element\/full page locally and check it into your project. When other team members run the visual tests, the baseline image is compared against the newly generated image. If it fails, WebdriverIO points out the visual differences by setting the color of the misaligned text\/region to a different color to make it clear where the differences are. If the visual changes are correct, you update the baseline image.<\/p>\n\n\n\n<p>A sample visual test looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-typescript\">\/\/ src\/components\/my-component\/my-component.test.tsx\nit(&#039;looks visually perfect&#039;, async () =&gt; {\n  render({\n    components: [MyComponent],\n    template: () =&gt; &lt;my-component first=&quot;looking&quot; last=&quot;&#039;visually perfect&#039; \ud83d\udc4c&quot; \/&gt;\n  });\n\n  const component = $(&#039;my-component&#039;);\n  await expect(component).toMatchElementSnapshot(&#039;MyComponent&#039;);\n});\n<\/code><\/pre>\n\n\n\n<p>Complete details about visual testing can be found <a href=\"https:\/\/stenciljs.com\/docs\/testing\/webdriverio\/visual-testing\">in the Stencil docs<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Improve your Stencil components today<\/h2>\n\n\n\n<p>WebdriverIO is a robust testing tool for automating your web and mobile applications. To get started using unit testing, mocking, or visual testing, follow <a href=\"https:\/\/stenciljs.com\/docs\/testing\/webdriverio\/overview#set-up\">the setup process <\/a>or check out <a href=\"https:\/\/webdriver.io\/docs\/component-testing\/stencil\/\">WebdriverIO\u2019s Stencil documentation<\/a>. In no time, you\u2019ll have built a scalable, robust, and stable test suite.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.<\/p>\n","protected":false},"author":62,"featured_media":6062,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"1","publish_post_category":"21","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"575348","discourse_permalink":"http:\/\/forum.ionicframework.com\/t\/testing-stencil-components-with-ease-using-webdriverio\/240879","wpdc_publishing_response":"success","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1,124],"tags":[76],"class_list":["post-6061","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","category-tutorials","tag-stencil"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Testing Stencil Components with Ease using WebdriverIO - Ionic Blog<\/title>\n<meta name=\"description\" content=\"Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing Stencil Components with Ease using WebdriverIO\" \/>\n<meta property=\"og:description\" content=\"Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-11T16:00:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-11T16:00:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2240\" \/>\n\t<meta property=\"og:image:height\" content=\"1120\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Matt Netkow\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dotNetkow\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matt Netkow\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\"},\"author\":{\"name\":\"Matt Netkow\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/93c8b2fe110f183510c6285b0de40790\"},\"headline\":\"Testing Stencil Components with Ease using WebdriverIO\",\"datePublished\":\"2024-04-11T16:00:13+00:00\",\"dateModified\":\"2024-04-11T16:00:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\"},\"wordCount\":451,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png\",\"keywords\":[\"stencil\"],\"articleSection\":[\"All\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\",\"url\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\",\"name\":\"Testing Stencil Components with Ease using WebdriverIO - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png\",\"datePublished\":\"2024-04-11T16:00:13+00:00\",\"dateModified\":\"2024-04-11T16:00:17+00:00\",\"description\":\"Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png\",\"width\":2240,\"height\":1120},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing Stencil Components with Ease using WebdriverIO\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/93c8b2fe110f183510c6285b0de40790\",\"name\":\"Matt Netkow\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/07\/mattnetkow-150x150.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/07\/mattnetkow-150x150.jpg\",\"caption\":\"Matt Netkow\"},\"sameAs\":[\"https:\/\/x.com\/dotNetkow\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/mattnetkow\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Testing Stencil Components with Ease using WebdriverIO - Ionic Blog","description":"Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio","og_locale":"en_US","og_type":"article","og_title":"Testing Stencil Components with Ease using WebdriverIO","og_description":"Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.","og_url":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio","og_site_name":"Ionic Blog","article_published_time":"2024-04-11T16:00:13+00:00","article_modified_time":"2024-04-11T16:00:17+00:00","og_image":[{"width":2240,"height":1120,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png","type":"image\/png"}],"author":"Matt Netkow","twitter_card":"summary_large_image","twitter_creator":"@dotNetkow","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Matt Netkow","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio"},"author":{"name":"Matt Netkow","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/93c8b2fe110f183510c6285b0de40790"},"headline":"Testing Stencil Components with Ease using WebdriverIO","datePublished":"2024-04-11T16:00:13+00:00","dateModified":"2024-04-11T16:00:17+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio"},"wordCount":451,"commentCount":0,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png","keywords":["stencil"],"articleSection":["All","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio","url":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio","name":"Testing Stencil Components with Ease using WebdriverIO - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png","datePublished":"2024-04-11T16:00:13+00:00","dateModified":"2024-04-11T16:00:17+00:00","description":"Over the past few months, the Stencil team has been working to expand the testing tools we support. First up is WebdriverIO.","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png","width":2240,"height":1120},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/testing-stencil-components-with-ease-using-webdriverio#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"Testing Stencil Components with Ease using WebdriverIO"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/93c8b2fe110f183510c6285b0de40790","name":"Matt Netkow","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/07\/mattnetkow-150x150.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2018\/07\/mattnetkow-150x150.jpg","caption":"Matt Netkow"},"sameAs":["https:\/\/x.com\/dotNetkow"],"url":"https:\/\/ionic.io\/blog\/author\/mattnetkow"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2024\/04\/webdriverio-stencil-feature-image.png","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/6061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=6061"}],"version-history":[{"count":2,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/6061\/revisions"}],"predecessor-version":[{"id":6064,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/6061\/revisions\/6064"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media\/6062"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=6061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=6061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=6061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}