{"id":112249,"date":"2021-12-12T15:15:00","date_gmt":"2021-12-12T13:15:00","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=112249"},"modified":"2021-12-03T14:52:11","modified_gmt":"2021-12-03T12:52:11","slug":"testing-exceptions-in-javascript-with-jest","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html","title":{"rendered":"Testing exceptions in JavaScript with Jest"},"content":{"rendered":"<p><a name=\"more\"><\/a><\/p>\n<h2 class=\"wp-block-heading\">The code<\/h2>\n<p>Let\u2019s consider a simple function that checks for equality of two passwords, and it throws an error when the first one is not provided:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">export default function samePasswordsValidator(password, otherPassword) {\n    if (!password) {\n        throw new Error(\"no password given\");\n    }\n    return password === otherPassword;\n}<\/pre>\n<h2 class=\"wp-block-heading\">Try-catch idiom (bad)<\/h2>\n<p>When testing the code that throws exceptions, one immediately comes up with the idea of using the <code>try-catch<\/code> idiom in the test code:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">it('throws an error when first argument is `null`', () =&gt; {\n    try {\n        samePasswordsValidator(null, \"bar\");\n    } catch (error) {\n        expect(error.message).toBe(\"no password given\");\n    }\n});<\/pre>\n<p>Generally speaking, this is not the best approach. The test passes when the first argument is <code>null<\/code> as expected. But when the code is about to change and the exception won\u2019t be thrown anymore the test still passes. So, the code change won\u2019t be detected by the test.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2 class=\"wp-block-heading\">Try-catch idiom (better)<\/h2>\n<p>To overcome that issue, one could expect that actual assertion will be executed and fail the test if it does not happen. This can be done pretty easily with <code>expect.assertions<\/code> which verifies that a certain number of assertions are called during a test:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">it('throws an error when first argument is `null`', () =&gt; {\n    expect.assertions(1);\n    try {\n        samePasswordsValidator(null, \"bar\");\n    } catch (error) {\n        expect(error.message).toBe(\"no password given\");\n    }\n});<\/pre>\n<p>Now, when no exception is thrown, the test fails:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">Error: expect.assertions(1)\n\nExpected one assertion to be called but received zero assertion calls.<\/pre>\n<h2 class=\"wp-block-heading\"><code>toThrow<\/code> assertions (best)<\/h2>\n<p>To make the code even more expressive a built-in <code>toThrow<\/code> matcher can be used:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">it('throws an error when first argument is `null`', () =&gt; {\n    expect(() =&gt; samePasswordsValidator(null, \"bar\")).toThrow(\"no password given\");\n});<\/pre>\n<p>And again, when no exception is thrown, Jest informs us clearly about it with a failed test:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">Error: expect(received).toThrow(expected)\n\nExpected substring: \"no password given\"\n\nReceived function did not throw<\/pre>\n<p>Note that <code>toThrow<\/code> matcher can be used to not only check the error message, but also the exact type of the error:<\/p>\n<pre class=\"wp-block-preformatted brush:java\">it('throws an error when first argument is `null`', () =&gt; {\n    expect(() =&gt; samePasswordsValidator(null, \"bar\")).toThrow(Error);\n    expect(() =&gt; samePasswordsValidator(null, \"bar\")).toThrow(new Error(\"no password given\"));\n});<\/pre>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Java Code Geeks with permission by Rafal Borowiec, partner at our <a href=\"\/\/www.javacodegeeks.com\/join-us\/jcg\/\" target=\"_blank\" rel=\"noopener\">JCG program<\/a>. See the original article here: <a href=\"https:\/\/blog.codeleak.pl\/2021\/11\/testing-exceptions-in-javascript.html\" target=\"_blank\" rel=\"noopener\">Testing exceptions in JavaScript with Jest<\/a><\/p>\n<p>Opinions expressed by Java Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The code Let\u2019s consider a simple function that checks for equality of two passwords, and it throws an error when the first one is not provided: export default function samePasswordsValidator(password, otherPassword) { if (!password) { throw new Error(&#8220;no password given&#8221;); } return password === otherPassword; } Try-catch idiom (bad) When testing the code that throws &hellip;<\/p>\n","protected":false},"author":516,"featured_media":20900,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1879],"tags":[273],"class_list":["post-112249","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Testing exceptions in JavaScript with Jest - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about Jest? Check our article explaining how to test exceptions in JavaScript with Jest.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing exceptions in JavaScript with Jest - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Jest? Check our article explaining how to test exceptions in JavaScript with Jest.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-12T13:15:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/javascript-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rafal Borowiec\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/kolorobot\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rafal Borowiec\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html\"},\"author\":{\"name\":\"Rafal Borowiec\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/b1a0b2657d5dd2459806446ac66d2d52\"},\"headline\":\"Testing exceptions in JavaScript with Jest\",\"datePublished\":\"2021-12-12T13:15:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html\"},\"wordCount\":250,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/01\\\/javascript-logo.jpg\",\"keywords\":[\"Testing\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html\",\"name\":\"Testing exceptions in JavaScript with Jest - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/01\\\/javascript-logo.jpg\",\"datePublished\":\"2021-12-12T13:15:00+00:00\",\"description\":\"Interested to learn about Jest? Check our article explaining how to test exceptions in JavaScript with Jest.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/01\\\/javascript-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/01\\\/javascript-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2021\\\/12\\\/testing-exceptions-in-javascript-with-jest.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/web-development\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/web-development\\\/javascript\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Testing exceptions in JavaScript with Jest\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/b1a0b2657d5dd2459806446ac66d2d52\",\"name\":\"Rafal Borowiec\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g\",\"caption\":\"Rafal Borowiec\"},\"description\":\"Software developer, Team Leader, Agile practitioner, occasional blogger, lecturer. Open Source enthusiast, quality oriented and open-minded.\",\"sameAs\":[\"http:\\\/\\\/blog.codeleak.pl\\\/\",\"http:\\\/\\\/pl.linkedin.com\\\/in\\\/borowiec\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/kolorobot\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/rafal-borowiec\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Testing exceptions in JavaScript with Jest - Java Code Geeks","description":"Interested to learn about Jest? Check our article explaining how to test exceptions in JavaScript with Jest.","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:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html","og_locale":"en_US","og_type":"article","og_title":"Testing exceptions in JavaScript with Jest - Java Code Geeks","og_description":"Interested to learn about Jest? Check our article explaining how to test exceptions in JavaScript with Jest.","og_url":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2021-12-12T13:15:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/javascript-logo.jpg","type":"image\/jpeg"}],"author":"Rafal Borowiec","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/kolorobot","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Rafal Borowiec","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html"},"author":{"name":"Rafal Borowiec","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/b1a0b2657d5dd2459806446ac66d2d52"},"headline":"Testing exceptions in JavaScript with Jest","datePublished":"2021-12-12T13:15:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html"},"wordCount":250,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/javascript-logo.jpg","keywords":["Testing"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html","url":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html","name":"Testing exceptions in JavaScript with Jest - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/javascript-logo.jpg","datePublished":"2021-12-12T13:15:00+00:00","description":"Interested to learn about Jest? Check our article explaining how to test exceptions in JavaScript with Jest.","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/javascript-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/01\/javascript-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2021\/12\/testing-exceptions-in-javascript-with-jest.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/www.javacodegeeks.com\/category\/web-development"},{"@type":"ListItem","position":3,"name":"JavaScript","item":"https:\/\/www.javacodegeeks.com\/category\/web-development\/javascript"},{"@type":"ListItem","position":4,"name":"Testing exceptions in JavaScript with Jest"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/b1a0b2657d5dd2459806446ac66d2d52","name":"Rafal Borowiec","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e24680b2ba3dfc13759acf6c1f125e54356bc533e0befe953fea365cadcdaffb?s=96&d=mm&r=g","caption":"Rafal Borowiec"},"description":"Software developer, Team Leader, Agile practitioner, occasional blogger, lecturer. Open Source enthusiast, quality oriented and open-minded.","sameAs":["http:\/\/blog.codeleak.pl\/","http:\/\/pl.linkedin.com\/in\/borowiec\/","https:\/\/x.com\/https:\/\/twitter.com\/kolorobot"],"url":"https:\/\/www.javacodegeeks.com\/author\/rafal-borowiec"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/112249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/516"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=112249"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/112249\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/20900"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=112249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=112249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=112249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}