<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brad Dunn</title>
    <description>The latest articles on DEV Community by Brad Dunn (@bdunn313).</description>
    <link>https://dev.to/bdunn313</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F154611%2F7aaf50c5-a1fd-45d1-a3f0-1d3defa299b4.jpeg</url>
      <title>DEV Community: Brad Dunn</title>
      <link>https://dev.to/bdunn313</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bdunn313"/>
    <language>en</language>
    <item>
      <title>Resilient Snapshot Testing with Material-UI and React Testing Library</title>
      <dc:creator>Brad Dunn</dc:creator>
      <pubDate>Fri, 03 Sep 2021 17:22:30 +0000</pubDate>
      <link>https://dev.to/bdunn313/resilient-snapshot-testing-with-material-ui-and-react-testing-library-42bb</link>
      <guid>https://dev.to/bdunn313/resilient-snapshot-testing-with-material-ui-and-react-testing-library-42bb</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was &lt;a href="https://medium.com/building-the-open-data-stack/resilient-snapshot-testing-with-material-ui-and-react-testing-library-befa04d4446f"&gt;originally published&lt;/a&gt; on the &lt;a href="https://dtsx.io/3ytZJJL"&gt;DataStax Tech Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;When appropriately used, snapshot testing can be a fantastic way to cover component interactions in your test suite. With just a few lines of test code, developers can validate hard-to-test component behavior in a low-cost manner. However, snapshot testing works best when they fail as a direct cause of meaningful changes to the component’s behavior under test. This style of testing becomes much less helpful if snapshots are volatile and regularly track superficial changes to your components.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Using snapshot testing with a library that uses the popular &lt;a href="https://material-ui.com/"&gt;Material-UI&lt;/a&gt; component library can create a surprising amount of unnecessary snapshot updates and effectively remove snapshot testing as a valuable tool in your testing toolbox. This article will examine this problem and find a solution to cut down on this extra snapshot noise.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt; This writeup assumes that you are using Jest, Testing Library (React), and Material-UI in your project.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Snapshot tests become much less useful when paired with MaterialUI’s CSS-in-JS solution. At runtime, MaterialUI’s &lt;a href="https://material-ui.com/styles/api/#stylesprovider"&gt;StylesProvider&lt;/a&gt; guarantees globally unique class names for your app by adding incremental IDs to the end of the generated class names. This class generation method leads to frivolous snapshot updates like the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;&amp;lt;div&amp;gt;
&lt;/span&gt;   &amp;lt;div
&lt;span class="gd"&gt;- class=”makeStyles-wrapper-1"
&lt;/span&gt;&lt;span class="gi"&gt;+ class=”makeStyles-wrapper-2"
&lt;/span&gt;   &amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Snapshot diffs like this one increase the signal-to-noise ratio of snapshot changes and water down their usefulness. Developers cannot hunt for the meaningful differences in snapshot tests, leading to an increase in bugs introduced to the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution: Cut down on the className noise
&lt;/h2&gt;

&lt;p&gt;Fortunately, we can modify the behavior of Material-UI’s CSS-in-JS solution and reduce the noise in our snapshots by:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Modifying Material-UI’s class generation function to drop the unique identifiers at the end of class names&lt;/li&gt;
&lt;li&gt;Creating a custom render function for React Testing Library using the modified generator function&lt;/li&gt;
&lt;li&gt;Using our custom render function in place of the base render function for all of our tests&lt;/li&gt;
&lt;li&gt;Updating all existing snapshots to drop the generated class noise.Modifying the class generator&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Modifying the Class Generator
&lt;/h3&gt;

&lt;p&gt;Material-UI uses a &lt;a href="https://material-ui.com/styles/api/#stylesprovider"&gt;StylesProvider&lt;/a&gt; component to manage the style-related context in our application. This component has a &lt;code&gt;generateClassName&lt;/code&gt; prop that allows us to pass in a custom function telling the provider how to construct new class names when needed. We can wire up a function that drops the unique ID that affects our snapshots:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;snapshotFriendlyClassNameGenerator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;styleSheet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
   &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;styleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classNamePrefix&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We want to keep our &lt;code&gt;snapshotFriendlyClassNameGenerator&lt;/code&gt; as close to our running app as possible, so we retain any prefix or rule key that might be present. This leads to class names like &lt;code&gt;makeStyles-wrapper&lt;/code&gt; but without any numbered identifier as a suffix. We can now pair our custom generator function with an instance of &lt;code&gt;StylesProvider&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SnapshotFriendlyStylesProvider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
   &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;StylesProvider&lt;/span&gt; &lt;span class="na"&gt;generateClassName&lt;/span&gt;  
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;snapshotFriendlyClassNameGenerator&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
   &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;StylesProvider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a custom render function
&lt;/h3&gt;

&lt;p&gt;In order to introduce our new &lt;code&gt;SnapshotFriendlyStylesProvider&lt;/code&gt; into all of our tests, we need to write a custom React Testing Library render function like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;customRender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
   &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;wrapper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SnapshotFriendlyStylesProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The subject of custom render functions is not new. The &lt;a href="https://testing-library.com/docs/"&gt;official docs&lt;/a&gt; have a &lt;a href="https://testing-library.com/docs/react-testing-library/setup#custom-render"&gt;great write-up&lt;/a&gt; about why you might need one and how to implement one. In a nutshell, we are just wrapping a regular render call in our new &lt;code&gt;SnapshotFriendlyStylesProvider&lt;/code&gt; to remove additional class name noise!&lt;/p&gt;

&lt;h2&gt;
  
  
  Using our custom render function
&lt;/h2&gt;

&lt;p&gt;To see the payoff we want, we need to use our new &lt;code&gt;customRender&lt;/code&gt; function instead of the render function provided by React Testing Library. Next, we need to create a &lt;code&gt;testUtils.js&lt;/code&gt; file and re-export the rest of React testing library.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;react&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Override our render with the snapshot-friendly render.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;customRender&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;render&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A final &lt;code&gt;testUtils.js&lt;/code&gt; file with all of the previous steps may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;render&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;testing&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;library&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;react&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StylesProvider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;material&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;ui&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;core&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;snapshotFriendlyClassNameGenerator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;styleSheet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
   &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;styleSheet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classNamePrefix&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;rule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SnapshotFriendlyStylesProvider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;         &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;StylesProvider&lt;/span&gt; 
   &lt;span class="na"&gt;generateClassName&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;snapshotFriendlyClassNameGenerator&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;StylesProvider&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;customRender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
   &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;wrapper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;SnapshotFriendlyStylesProvider&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@testing-library/react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Override our render with the snapshot-friendly render.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;customRender&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;render&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Finish the job
&lt;/h3&gt;

&lt;p&gt;To complete the change and bring some more resiliency to your snapshots, we need to perform the final step of utilizing our &lt;code&gt;customRender&lt;/code&gt; function instead of the out-of-the-box render function provided by React Testing Library and re-generate all of our snapshots. Hence, future changes to our tests generate relevant, slimmed-down snapshot diffs.&lt;/p&gt;

&lt;p&gt;To use our new render function, we can update all of our tests as follows (assuming &lt;code&gt;testUtils.js&lt;/code&gt; and our target test is in the same directory):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;- import { render } from ‘@testing-library/react’;
&lt;/span&gt;&lt;span class="gi"&gt;+ import { render } from ‘./testUtils’;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we can update all of our test snapshots.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Warning:&lt;/em&gt; Make sure you are making this change in isolation; you do not want to accidentally overlook a separate issue that might get buried in the snapshot diffs generated by this step!&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# using jest directly&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;jest — updateSnapshot
&lt;span class="c"&gt;# create-react-app/react-scripts example&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;npm &lt;span class="nb"&gt;test&lt;/span&gt; — — updateSnapshot — &lt;span class="nv"&gt;watchAll&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this point, all future snapshot tests should not have frivolous style-only diffs for your Material-UI components. Huzzah!&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;By reducing the noise generated by Material-UI’s class names, we can regain the use of snapshot tests in our codebase. We also now know how to construct custom render methods for our tests, allowing us to cut down on boilerplate code in our tests. Finally, we also now have an excellent foundation for future reusable test utilities that we can use to make our tests easier to write and clearer to read.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Follow the &lt;a href="https://dtsx.io/3ytZJJL"&gt;DataStax Tech Blog&lt;/a&gt; for more developer stories. Check out our &lt;a href="https://dtsx.io/3yoWOSP"&gt;YouTube&lt;/a&gt; channel for tutorials and here for DataStax Developers on &lt;a href="https://dtsx.io/2WquUck"&gt;Twitter&lt;/a&gt; for the latest news about our developer community.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://material-ui.com/"&gt;Material-UI’s official docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://testing-library.com/"&gt;Testing Library — React&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://testing-library.com/docs/react-testing-library/setup#custom-render"&gt;Creating custom render functions in React testing library&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mui-org/material-ui/issues/9492"&gt;Relevant bug report on Material-UI repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>jest</category>
      <category>materialui</category>
    </item>
    <item>
      <title>Experiences with the Shape Up process</title>
      <dc:creator>Brad Dunn</dc:creator>
      <pubDate>Tue, 18 Aug 2020 13:48:28 +0000</pubDate>
      <link>https://dev.to/bdunn313/experiences-with-the-shape-up-process-3439</link>
      <guid>https://dev.to/bdunn313/experiences-with-the-shape-up-process-3439</guid>
      <description>&lt;p&gt;I run a small software team where we have been experimenting with the &lt;a href="https://basecamp.com/shapeup/webbook"&gt;Shape Up process&lt;/a&gt; developed by the people at &lt;a href="https://basecamp.com/"&gt;Basecamp&lt;/a&gt;. We've only ran a handful of projects with them, and it's been a interesting ride so far. All of our projects have been huge successes from the business perspective, but I'd be lying if we didn't run into some roadbumps along the way.&lt;/p&gt;

&lt;p&gt;If you have not heard about Shape Up before, I highly recommend at least reading through some of the introductory pages of the process (or the whole book - its &lt;a href="https://basecamp.com/shapeup/webbook"&gt;freely available online&lt;/a&gt;). The basic idea of the process is that you spend a lot of time "shaping up" brand new projects by spending time researching, thinking of the basic elements of a new feature, the impact on the business or customer, and de-risking any particularly gnarly technical questions up front and in an asynchronous manner from teams actually performing project work. Finally, the team that will execute the project receives a fully-baked idea that gives them plenty of creative wiggle room to make meaningful decisions on &lt;em&gt;how&lt;/em&gt; the idea will become a reality. The project team does this by having full control over scope, and being given the time to explore different ways to achieve the project as long as the project is executed within a fixed timeline (by default 6 weeks).&lt;/p&gt;

&lt;p&gt;I'm interested to hear if anyone else is experimenting with this process, and what their experiences have been so far. For my team, it's allowed us to bite of projects that would have been extremely difficult to execute via a scrum. I suspect that the main reason behind this is the acceptance that engineers will not &lt;em&gt;truly&lt;/em&gt; understand the scope of a problem until they start to get their hands dirty. By allowing engineers to have this discovery time baked into the process, as well as giving the project team the power to respond to discovered additional work by having control over the overall scope of the project has been a game changer for us.&lt;/p&gt;

&lt;p&gt;So - is anyone else using the Shape Up method? Does it sound interesting? What are your thoughts?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>projectmanagement</category>
      <category>buildingsoftware</category>
    </item>
  </channel>
</rss>
