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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tmbb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tmbb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="tmbb" data-post="10" data-topic="9913">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>Hm… Doesn’t seem ideal for the use case of visually inspecting Makeup’s output. In that case I don’t care about diffs, I want to look at the rendered HTM</p>
</blockquote>
</aside>
<p>To correct my own stupidity: You were probably talking about diffing HTML in a meaningful way (that is, graphically in a web canvas). This makes total sense, of course.</p>
<p>Still, I wonder if separating the test running part and the approval part could be helpful, even though the prompts don’t actually block test execution. As soon as I have the time for it, I’ll test your approach and explore a separate workflow with separate test running and approval steps.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57621" 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/assert-value-exunits-assert-on-steroids-that-writes-and-updates-tests-for-you/9913/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-57621" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57621"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="57672" data-post-id="57672">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gleb" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gleb
                      <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>Right, we would pass you the full actual and expected values for you to do with as you please. This is how external/visual diff tools work with source control. And our use seems similar.</p>
<p>We’re happy to have you use our assert_value any way you’d like. But my advice would be to not worry too much about inspecting freshly generated new values for new tests for now. Makeup already works, and you have done a lot of work to make sure it works well. I would focus on thinking of good test cases and just accept whatever output they currently give. That way you capture the value of engineering and manual testing you have done already into automated tests.</p>
<p>The real benefit will come next, once you have a solid regression test suite to know when Makeup’s behavior changes. Those changes, will be worth inspecting in a lot of detail to see whether they’re good or bad.</p>
<p>And once you have this going for a while you will know the best way to serialize the data-HTML or AST or whatever. Then you can change the serializer with little effort.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57672" 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/assert-value-exunits-assert-on-steroids-that-writes-and-updates-tests-for-you/9913/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-57672" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57672"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="57675" data-post-id="57675">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="joshtaylor" data-post="3" data-topic="9913">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/j/9fc348/48.png" class="avatar"> joshtaylor:</div>
<blockquote>
<p>had a similar idea recently about updating tests like this</p>
</blockquote>
</aside>
<p>well Jest has being doing this for a long while with snapshot testing with additional bonus of not having to provide initial value either <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" 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="57675" 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/assert-value-exunits-assert-on-steroids-that-writes-and-updates-tests-for-you/9913/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-57675" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57675"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="71020" data-post-id="71020">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>New version 0.8.2 has been released</p>
<h3><a name="p-71020-new-features-1" class="anchor" href="#p-71020-new-features-1" aria-label="Heading link" rel="nofollow"></a>New Features</h3>
<p>Previous version supported only argument types which implemented String.Chars protocol on the left and string heredocs on the right. 0.8.2 supports all argument types (e.g.  Integer, List, Map) except not serializable (e.g. Function, PID, Reference) So now you can write</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">assert_value 2 + 2 == 4
assert_value %{a: true} == %{a: true}
</code></pre>
<h3><a name="p-71020-enhancements-2" class="anchor" href="#p-71020-enhancements-2" aria-label="Heading link" rel="nofollow"></a>Enhancements</h3>
<ul>
<li>Better parser now supports any kind of formatting (expressions, parentheses, multi-line, etc.)</li>
<li>Better formatter (smarter formatting one-line and multi-line strings)</li>
<li>Better error reporting</li>
<li>Ensure compatibility with Elixir 1.6</li>
</ul>
<h3><a name="p-71020-upgrade-instructions-3" class="anchor" href="#p-71020-upgrade-instructions-3" aria-label="Heading link" rel="nofollow"></a>Upgrade Instructions</h3>
<ul>
<li>Run <code>mix test</code>. You may get diffs because assert_value no longer converts everything to a string</li>
<li>Run <code>ASSERT_VALUE_ACCEPT_DIFFS=reformat mix test</code> to take advantage of improved formatter</li>
<li>Add this to .formatter.exs to make Elixir formatter not to add parens to assert_value<pre data-code-wrap="elixir"><code class="lang-elixir">[
  import_deps: [:assert_value]
]
</code></pre>
</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="71020" 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/assert-value-exunits-assert-on-steroids-that-writes-and-updates-tests-for-you/9913/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-71020" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="71020"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="82081" data-post-id="82081">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>New version 0.9.1 has been released</p>
<h2><a name="p-82081-new-feature-elixir-formatter-1" class="anchor" href="#p-82081-new-feature-elixir-formatter-1" aria-label="Heading link" rel="nofollow"></a>New Feature: Elixir Formatter</h2>
<p>assert_value now uses Elixir Formatter to format values. This improves formatting of big data structures. Previously assert_value formatted expected values other than strings as one line. This made code hard to read when using big data structures like long arrays and nested maps. Now we use Elixir Formatter and it formats them correctly on multiple lines.</p>
<p>v0.8.5</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">assert_value foo() ==  [foo: "foo", bar: "bar", baz: "baz", qux: "qux", xyz: "xyz"]
</code></pre>
<p>v0.9.1</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">assert_value foo() == [
               foo: "foo",
               bar: "bar",
               baz: "baz",
               qux: "qux",
               xyz: "xyz"
             ]
</code></pre>
<h2><a name="p-82081-enhancement-easier-to-understand-diff-2" class="anchor" href="#p-82081-enhancement-easier-to-understand-diff-2" aria-label="Heading link" rel="nofollow"></a>Enhancement: Easier to Understand Diff</h2>
<p>assert_value now shows more context in diffs. Compare these two outputs:</p>
<p>v0.8.5</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">test/example_test.exs:7:"test expected" assert_value 2 + 2 failed

-
+4
</code></pre>
<p>v0.9.1</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">test/example_test.exs:7:"test example" assert_value failed

-    assert_value 2 + 2
+    assert_value 2 + 2 == 4
</code></pre>
<h2><a name="p-82081-requirements-3" class="anchor" href="#p-82081-requirements-3" aria-label="Heading link" rel="nofollow"></a>Requirements</h2>
<p>assert_value now requires Elixir &gt;= 1.6</p>
<h2><a name="p-82081-upgrade-instructions-4" class="anchor" href="#p-82081-upgrade-instructions-4" aria-label="Heading link" rel="nofollow"></a>Upgrade Instructions</h2>
<ul>
<li>Add this to .formatter.exs:<pre data-code-wrap="elixir"><code class="lang-elixir">[
  # don't add parens around assert_value arguments
  import_deps: [:assert_value],
  # use this line length when updating expected value
  line_length: 98 # whatever you prefer, default is 98
]
</code></pre>
</li>
<li>Run <code>ASSERT_VALUE_ACCEPT_DIFFS=reformat mix test</code> to take advantage of improved formatter</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="82081" 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/assert-value-exunits-assert-on-steroids-that-writes-and-updates-tests-for-you/9913/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-82081" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="82081"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>