<div dir="ltr">Could you customise the digest mechanism in sprockets to produce empty (or knowable) digest suffixes.  Of course, you'd only want this for the JS test run, so you're not testing your exact production files, but you're testing something very close to it.<div>
<br></div><div>Alternatively, could you asset compile the JS test harness so that it has the digested asset names in it?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 30 July 2013 20:14, James Coglan <span dir="ltr"><<a href="mailto:jcoglan@gmail.com" target="_blank">jcoglan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a conundrum. Whereas:<div><br></div><div>* JS testing is easiest if done with a bunch of static HTML/JS files rather than booting a web framework and various weird opaque and brittle glue libraries, especially if you want to use a runner/CI system like TestSwarm, Testling, Karma, Testem or Buster</div>

<div><br></div><div>* Testing your production files is better than testing your source code</div><div><br></div><div>* The Rails 3 asset pipeline produced files both with and without digest hashes in the filename, and you could use the predictable digest-less names for test setup (even though compiling assets in development mode produces other weird bugs because of Heroku using ActionDispatch::Static in production)</div>

<div><br></div><div>* The Rails 4 asset pipeline no longer produces digest-less files</div><div><br></div><div>Therefore:</div><div><br></div><div>How do you test your JS? My opinion so far is to just write source JS that doesn't require a build step, or use a build system that's not coupled to Rails.</div>

<div><br></div><div>Your thoughts?<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br>James Coglan<br><a href="http://jcoglan.com" target="_blank">http://jcoglan.com</a><br>+44 (0) 7771512510
</font></span></div></div>
<br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div>