<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="281789" data-post-id="281789">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Semantic diffing is now in <code>main</code>. If anyone is interested in trying it out, please add <code>:mneme</code> as a git dependency and enable semantic diffs in your <code>test.exs</code> configuration:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># mix.exs
defp deps do
  [
    {:mneme, github: "zachallaun/mneme", only: :test}
  ]
end

# config/test.exs
config :mneme, defaults: [diff: :semantic]
</code></pre>
<p>If you run into any errors, please let me know by opening an issue <a href="https://github.com/zachallaun/mneme/issues" rel="noopener nofollow ugc">on GitHub</a>!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281789" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-281789" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281789"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="282157" data-post-id="282157">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-282157-v02-released-1" class="anchor" href="#p-282157-v02-released-1" aria-label="Heading link" rel="nofollow"></a>v0.2 released</h2>
<ul>
<li><a href="https://hex.pm/packages/mneme/0.2.1" rel="nofollow">Package on hex.pm</a></li>
<li><a href="https://hexdocs.pm/mneme/0.2.1/changelog.html" rel="noopener nofollow ugc">Changelog</a></li>
<li><a href="https://hexdocs.pm/mneme/0.2.1/Mneme.html" rel="noopener nofollow ugc">Docs </a></li>
</ul>
<p>Note: Mneme now requires Elixir v1.14 or later.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp deps do
  [
    {:mneme, "~&gt; 0.2.1", only: :test}
  ]
end
</code></pre>
<h3><a name="p-282157-semantic-diffs-2" class="anchor" href="#p-282157-semantic-diffs-2" aria-label="Heading link" rel="nofollow"></a>Semantic diffs</h3>
<p>In addition to some quality-of-life changes when things go wrong, the big feature that v0.2 brings is a custom diff engine that produces dramatically more readable diffs when auto-assertions are updated. I’m really excited about this and it’s made Mneme much more pleasant to use, at least for me.</p>
<p>I expect there to be some formatting bugs – please report them on GitHub if you encounter anything weird! If you desire the old behavior, you can <a href="https://hexdocs.pm/mneme/0.2.1/Mneme.html#module-configuration" rel="noopener nofollow ugc">configure Mneme</a> to continue using textual diffs as before.</p>
<h4><a name="p-282157-example-1-new-assertions-highlight-only-the-new-value-3" class="anchor" href="#p-282157-example-1-new-assertions-highlight-only-the-new-value-3" aria-label="Heading link" rel="nofollow"></a>Example 1. New assertions highlight only the new value</h4>
<p>Text<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/4/3/4333c980a087b245eee5fc27673fabb1a0fc5efe.png" data-download-href="https://forum.elixirforum.com/uploads/default/4333c980a087b245eee5fc27673fabb1a0fc5efe" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/4/3/4333c980a087b245eee5fc27673fabb1a0fc5efe.png" alt="image" data-base62-sha1="9AuWwolOUwd3mTXkSMW9bpH2CaW" width="690" height="292" data-dominant-color="2B2F38"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1067×453 26.2 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Semantic<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/b/7/b7e30c0c4034a278a01946aa86fb363f06fab738.png" data-download-href="https://forum.elixirforum.com/uploads/default/b7e30c0c4034a278a01946aa86fb363f06fab738" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/b/7/b7e30c0c4034a278a01946aa86fb363f06fab738.png" alt="image" data-base62-sha1="qeJP2iA2nd3ulmQyXyQ0WZyM4f6" width="690" height="227" data-dominant-color="2D333B"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1001×330 24.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<h4><a name="p-282157-example-2-changed-assertions-highlight-deletedadded-nodes-4" class="anchor" href="#p-282157-example-2-changed-assertions-highlight-deletedadded-nodes-4" aria-label="Heading link" rel="nofollow"></a>Example 2. Changed assertions highlight deleted/added nodes</h4>
<p>Text<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/8/9/89512cdcee169f0bf840e9384d84acdc0819a728.png" data-download-href="https://forum.elixirforum.com/uploads/default/89512cdcee169f0bf840e9384d84acdc0819a728" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/8/9/89512cdcee169f0bf840e9384d84acdc0819a728.png" alt="image" data-base62-sha1="jALkuSDaLanL0WUPGiun6QU1H6g" width="690" height="463" data-dominant-color="2D2F39"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1005×675 38.9 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Semantic<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/f/0/f05ac81b0eeee68f598198c022734dbf708101c7.png" data-download-href="https://forum.elixirforum.com/uploads/default/f05ac81b0eeee68f598198c022734dbf708101c7" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/f/0/f05ac81b0eeee68f598198c022734dbf708101c7.png" alt="image" data-base62-sha1="yih5GAgN2tJ1NagdTeZEV8puSp1" width="690" height="396" data-dominant-color="2D303A"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">959×551 33.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<h4><a name="p-282157-example-3-slightly-changed-strings-call-out-the-changed-portion-5" class="anchor" href="#p-282157-example-3-slightly-changed-strings-call-out-the-changed-portion-5" aria-label="Heading link" rel="nofollow"></a>Example 3. Slightly changed strings call out the changed portion</h4>
<p>Text<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/4/b/4b0ee8c436227ce70ac569879dcbdff2cf029403.png" data-download-href="https://forum.elixirforum.com/uploads/default/4b0ee8c436227ce70ac569879dcbdff2cf029403" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/4/b/4b0ee8c436227ce70ac569879dcbdff2cf029403.png" alt="image" data-base62-sha1="aHZKHgCZsdik0leRtkAOSIYkHxV" width="690" height="370" data-dominant-color="2C2E39"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">983×528 26.8 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Semantic<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/1/6/1655f072a34e0a04a6bfaefd8c8aaf8ac4872ce4.png" data-download-href="https://forum.elixirforum.com/uploads/default/1655f072a34e0a04a6bfaefd8c8aaf8ac4872ce4" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/1/6/1655f072a34e0a04a6bfaefd8c8aaf8ac4872ce4.png" alt="image" data-base62-sha1="3bACXlxpmG1MAxMxIGiyFz9ZG72" width="690" height="496" data-dominant-color="2D2F3A"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">947×682 36.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<h4><a name="p-282157-future-work-6" class="anchor" href="#p-282157-future-work-6" aria-label="Heading link" rel="nofollow"></a>Future work</h4>
<ul>
<li>Diff quality: These diffs could still be improved. For instance, example 2 highlighted a suboptimal set of square brackets.</li>
<li>Performance: For large expressions, semantic diffs will take too long and it will fall back to text diffs. I’m sure there’s still some low-hanging fruit for improving performance, however.</li>
<li>Formatting: I’d like to add side-by-side formatting to decrease the vertical real-estate needed. I’d also like to explore replacing very large, unchanged nodes with <code>...</code> or something in the same way that <code>inspect</code> does at a certain point.</li>
</ul> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="282157" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-282157" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="282157"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="282222" data-post-id="282222">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve released a new version (v0.2.2) that disables an optimization that was causing a poor diff in example 2 above, increasing the likelihood that subtrees would become “misaligned”.</p>
<p>v0.2.1<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/7/4/745bc2eff02daca72052168f002dee6f68ebe4df.png" data-download-href="https://forum.elixirforum.com/uploads/default/745bc2eff02daca72052168f002dee6f68ebe4df" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/7/4/745bc2eff02daca72052168f002dee6f68ebe4df.png" alt="image" data-base62-sha1="gBlZ2Ta8IClwxHxilZoZLXkqygD" width="690" height="396" data-dominant-color="2C2F39"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">959×551 33.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>v0.2.2<br>
</p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/8/3/836709cb600ed0190244b99103a08f0d13eac883.png" data-download-href="https://forum.elixirforum.com/uploads/default/836709cb600ed0190244b99103a08f0d13eac883" title="image" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/8/3/836709cb600ed0190244b99103a08f0d13eac883.png" alt="image" data-base62-sha1="iKrj2qalXt2SMqz3EHXkIRq4UrV" width="690" height="397" data-dominant-color="2E303A"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">951×548 34 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>The new diff does a much better job of reflecting the actual change: the <code>nil</code> is being replaced with a new subtree, and the second subtree is being modified.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="282222" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-282222" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="282222"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="282928" data-post-id="282928">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve released v0.2.3 which includes fixes for a few bugs.</p>
<hr>
<p>I’d also like to mention a <a href="https://github.com/zachallaun/mneme/issues/21" rel="noopener nofollow ugc">proposal I just posted on GitHub</a> for the introduction of <code>mix mneme</code> to run tests with Mneme prompts, which would be favored over the current behavior that hijacks <code>mix test</code>. If you have any thoughts/feelings about this, I’d invite you to read the proposal and react/respond on GitHub. <img src="https://forum.elixirforum.com/images/emoji/apple/slightly_smiling_face.png?v=15" title=":slightly_smiling_face:" class="emoji" alt=":slightly_smiling_face:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="282928" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-282928" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="282928"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="283178" data-post-id="283178">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-283178-v026-released-1" class="anchor" href="#p-283178-v026-released-1" aria-label="Heading link" rel="nofollow"></a>v0.2.6 released</h2>
<ul>
<li><a href="https://hex.pm/packages/mneme/0.2.6" rel="nofollow">Package on hex.pm</a></li>
<li><a href="https://hexdocs.pm/mneme/0.2.6/changelog.html" rel="noopener nofollow ugc">Changelog</a></li>
<li><a href="https://hexdocs.pm/mneme/0.2.6/Mneme.html" rel="noopener nofollow ugc">Docs </a></li>
</ul>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp deps do
  [
    {:mneme, "~&gt; 0.2.6", only: :test}
  ]
end
</code></pre>
<h3><a name="p-283178-changes-2" class="anchor" href="#p-283178-changes-2" aria-label="Heading link" rel="nofollow"></a>Changes</h3>
<p>In addition to a number of bug fixes, this release updated (and hopefully improved) the formatting for semantic diffs, including the addition of side-by-side diffs if terminal width allows. (This can be disabled with a config option if you prefer stacked diffs.)</p>
<p>An option to “skip” a changed assertion has also been added. This will pass the test, but fail the test run at the end. This can be useful if a test contains multiple auto-assertions, as rejecting the first one would immediately fail that test and prevent the later ones from running.</p>
<p>New demo:</p>
          <div class="onebox video-onebox">
            <video width="100%" height="100%" controls="">
              <source src="https://raw.githubusercontent.com/zachallaun/mneme/main/examples/demo.mp4">
              <a href="https://raw.githubusercontent.com/zachallaun/mneme/main/examples/demo.mp4" rel="noopener nofollow ugc">https://raw.githubusercontent.com/zachallaun/mneme/main/examples/demo.mp4</a>
            </video>
          </div>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="283178" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-283178" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="283178"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #25"></div>
  </section>
</div>
    <div class="postbit" id="284256" data-post-id="284256">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-284256-v030-rc0-released-1" class="anchor" href="#p-284256-v030-rc0-released-1" aria-label="Heading link" rel="nofollow"></a>v0.3.0-rc.0 released</h2>
<p>I’m hoping to cut a full release soon, but would like to give folks a few days to try things out and report any bugs that I missed, so I’ve pushed this release as an RC.</p>
<ul>
<li><a href="https://hexdocs.pm/mneme/0.3.0-rc.0/changelog.html" rel="noopener nofollow ugc">Changelog </a></li>
<li><a href="https://hexdocs.pm/mneme/0.3.0-rc.0/Mneme.html" rel="noopener nofollow ugc">Docs </a></li>
</ul>
<pre data-code-wrap="elixir"><code class="lang-elixir">defp deps do
  [
    {:mneme, "~&gt; 0.3.0-rc.0", only: :test}
  ]
end
</code></pre>
<h3><a name="p-284256-breaking-change-2" class="anchor" href="#p-284256-breaking-change-2" aria-label="Heading link" rel="nofollow"></a>Breaking change</h3>
<p><code>auto_assert</code> will now use <code>&lt;-</code> when comparing against falsy values instead of <code>==</code>, and support for <code>==</code> has been removed.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># old
auto_assert Function.identity(nil) == nil

# new
auto_assert nil &lt;- Function.identity(nil)
</code></pre>
<p>When I started on Mneme, I wanted the behavior of <code>auto_assert</code> to exactly match that of <code>assert</code>, including the expectation of a truthy value. Consider the following ExUnit assertions:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># this will fail
assert false = Function.identity(false)

# this would succeed
assert Function.identity(false) == false

# this might succeed or fail
assert some_predicate?()
</code></pre>
<p><code>assert</code> has to expect a truthy value to support that third case, but that case doesn’t make sense for <code>auto_assert</code>. We’re always trying to construct a match pattern, and we use the presence of <code>&lt;-</code> in an AST to disambiguate between a new assertion and one that is being (potentially) updated.</p>
<p>All in all, supporting <code>==</code> comparisons after <code>auto_assert</code> complicated the code and didn’t (in my opinion) add significant value, so I’ve decided to deviate from ExUnit in this particular way and to allow matches on falsy values to succeed.</p>
<h3><a name="p-284256-new-stuff-3" class="anchor" href="#p-284256-new-stuff-3" aria-label="Heading link" rel="nofollow"></a>New stuff</h3>
<p>In addition to a number of fixes, this release is largely about introducing <code>auto_assert_raise</code>, <code>auto_assert_receive</code>, and <code>auto_assert_received</code>.</p>
<h4><a name="p-284256-example-auto_assert_raise-4" class="anchor" href="#p-284256-example-auto_assert_raise-4" aria-label="Heading link" rel="nofollow"></a>Example: <code>auto_assert_raise</code></h4>
<pre data-code-wrap="elixir"><code class="lang-elixir">test "raises when passed invalid arguments" do
  auto_assert_raise fn -&gt; some_call!(:invalid) end
end
</code></pre>
<p>Running the test gives you two auto-generated options, one with and one without a message:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">test "raises when passed invalid arguments" do
  auto_assert_raise ArgumentError, fn -&gt; some_call!(:invalid) end

  # or

  auto_assert_raise ArgumentError, "expected message", fn -&gt; some_call!(:invalid) end
end
</code></pre>
<h4><a name="p-284256-example-auto_assert_receive-auto_assert_received-5" class="anchor" href="#p-284256-example-auto_assert_receive-auto_assert_received-5" aria-label="Heading link" rel="nofollow"></a>Example: <code>auto_assert_receive</code> / <code>auto_assert_received</code></h4>
<p>Example test case:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">test "current process should receive an ack" do
  ref = send_request!()

  auto_assert_receive()
end
</code></pre>
<p>Running the test will prompt you with options for each message received by the current process during the timeout window (default 100ms, same as ExUnit’s <code>assert_receive</code>):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">test "current process should receive an ack" do
  ref = send_request!()

  auto_assert_receive {:ack, ^ref}
end
</code></pre>
<p>As with ExUnit, <code>auto_assert_received</code> is the same as <code>auto_assert_receive</code> with a timeout of 0.</p>
<hr>
<p>As always, any feedback is greatly appreciated!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="284256" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-284256" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="284256"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #26"></div>
  </section>
</div>
    <div class="postbit" id="284272" data-post-id="284272">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mgibowski" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mgibowski/120/21221_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mgibowski
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi, did you consider adding auto_refute?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="284272" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-284272" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="284272"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #27"></div>
  </section>
</div>
    <div class="postbit" id="284275" data-post-id="284275">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, that was my original plan, but I decided against it because I feel that Mneme doesn’t provide value when you’re simply asserting against a boolean expression. In that case, you should just be using <code>assert</code> or <code>refute</code> directly.</p>
<p>I also think that it would be more confusing to see your <code>auto_assert</code> being converted to an <code>auto_refute</code> because it began returning a falsy value, instead of <code>auto_assert false &lt;- whatever()</code>. Unifying on <code>auto_assert</code> keeps the return value obvious and explicit.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="284275" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-284275" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="284275"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #28"></div>
  </section>
</div>
    <div class="postbit" id="284625" data-post-id="284625">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-284625-v030-is-now-available-1" class="anchor" href="#p-284625-v030-is-now-available-1" aria-label="Heading link" rel="nofollow"></a>v0.3.0 is now available</h2>
<ul>
<li><a href="https://hexdocs.pm/mneme/changelog.html" rel="noopener nofollow ugc">Changelog</a></li>
<li><a href="https://hexdocs.pm/mneme/Mneme.html" rel="noopener nofollow ugc">Docs</a></li>
</ul>
<p>This is the biggest release yet, including new auto-assertions (<a href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/27" rel="nofollow">mentioned above</a>), quality-of-life improvements, and numerous bug fixes. A couple of additional things made it into the release since the first RC:</p>
<ul>
<li>One-line summary is now printed at the end of the test run.</li>
<li><code>:force_update</code> option is now available, forcing patterns to regenerate even when they would succeed. This is especially useful when you’re working on something using maps or structs, since patterns would not re-generate when a key is added.  (Thanks to <a class="mention" href="/u/mindreframer" rel="nofollow">@mindreframer</a> for suggesting this feature!)</li>
</ul>
<p>Please see the changelog linked above for the full list of changes!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="284625" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-284625" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="284625"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #29"></div>
  </section>
</div>
    <div class="postbit" id="286856" data-post-id="286856">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachallaun" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachallaun/120/29208_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachallaun
                      <span class="op-star" title="Thread Starter">
                        <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                      </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<h2><a name="p-286856-v033-is-now-available-1" class="anchor" href="#p-286856-v033-is-now-available-1" aria-label="Heading link" rel="nofollow"></a>v0.3.3 is now available</h2>
<ul>
<li><a href="https://hexdocs.pm/mneme/changelog.html" rel="noopener nofollow ugc">Changelog </a></li>
<li><a href="https://hexdocs.pm/mneme/Mneme.html" rel="noopener nofollow ugc">Docs</a></li>
</ul>
<p>The last couple of releases have been smaller fixes and improvements to multi-line string handling, but this release of v0.3.3 has a pretty significant quality-of-life change that I thought it was worth mentioning here that much improves the default pattern selection for maps and structs.</p>
<p>Consider the following new auto-assertion:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">user = %{first_name: "Zach", last_name: "Allaun"}

auto_assert put_role(user, :moderator)
</code></pre>
<p>When this runs, it will generate two patterns that you can select from:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">auto_assert %{} &lt;- put_role(user, :moderator)

auto_assert %{first_name: "Zach", last_name: "Allaun", role: :moderator} &lt;-
              put_role(user, :moderator)
</code></pre>
<p>Now let’s say you select the second one, but you modify the assertion to only assert on the role:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">auto_assert %{role: :moderator} &lt;- put_role(user, :moderator)
</code></pre>
<p>Previously, if the result of <code>put_role</code> changed (say, it starts returning roles in a list), Mneme would only generate the “empty” and “full” patterns again, and you’d have to re-edit it down. As of v0.3.3, Mneme will also generate a pattern for the subset of keys you’re asserting on, and select it by default:</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/f/8/f858bba3dcc35aace8f66541697c9a66e2fd6fd9.png" data-download-href="https://forum.elixirforum.com/uploads/default/f858bba3dcc35aace8f66541697c9a66e2fd6fd9" title="Screenshot 2023-05-01 102941" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/f/8/f858bba3dcc35aace8f66541697c9a66e2fd6fd9.png" alt="Screenshot 2023-05-01 102941" data-base62-sha1="zqYwngjWG0R0W5A0ZJ38TFeLHxD" width="690" height="238" data-dominant-color="32343E"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2023-05-01 102941</span><span class="informations">726×251 12.7 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>This fixes one of my personal pet-peeves. One of the most important tenants guiding Mneme is to suggest the assertions you’d write yourself, and this particular case came up surprisingly often in my own usage.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="286856" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/mneme-snapshot-testing-tool-for-the-busy-programmer/54012/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-286856" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="286856"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #30"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/54012/load_more?page=4">Load more posts</a>
</div></template></turbo-stream>