<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Unit Testing with JavaScript and TextMate</title>
	<atom:link href="http://nerd.metrocat.org/2006/07/unit-testing-with-javascript-and-textmate/feed" rel="self" type="application/rss+xml" />
	<link>http://nerd.metrocat.org/2006/07/unit-testing-with-javascript-and-textmate</link>
	<description>You're reading Jeff Watkins' thoughts about Web application design and development with a little bit of technology ranting thrown in for free.</description>
	<lastBuildDate>Sun, 08 Jun 2008 07:06:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave Cantrell</title>
		<link>http://nerd.metrocat.org/2006/07/unit-testing-with-javascript-and-textmate/comment-page-1#comment-2917</link>
		<dc:creator>Dave Cantrell</dc:creator>
		<pubDate>Tue, 12 Jun 2007 18:51:27 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.newburyportion.com/2006/07/unit-testing-with-javascript-and-textmate#comment-2917</guid>
		<description>&lt;p&gt;Oh, I meant to add that calling teardown() in the finally{} block also helps narrow down where failures occur, at least for me. If an error occurs in the test the next test(s) runs, but if it occurs in the teardown() then I&#039;m back to every test failing. I know this isn&#039;t 100% guaranteed, but it gives me an idea of where to start looking at least.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oh, I meant to add that calling teardown() in the finally{} block also helps narrow down where failures occur, at least for me. If an error occurs in the test the next test(s) runs, but if it occurs in the teardown() then I&#8217;m back to every test failing. I know this isn&#8217;t 100% guaranteed, but it gives me an idea of where to start looking at least.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Cantrell</title>
		<link>http://nerd.metrocat.org/2006/07/unit-testing-with-javascript-and-textmate/comment-page-1#comment-2916</link>
		<dc:creator>Dave Cantrell</dc:creator>
		<pubDate>Tue, 12 Jun 2007 18:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.newburyportion.com/2006/07/unit-testing-with-javascript-and-textmate#comment-2916</guid>
		<description>&lt;p&gt;Love this. Because of this I am able to actually write &quot;real&quot; command-line javascript code and unit test it properly. On Windows, run from a command line in jEdit to boot! So yes your WshTestRunner runs just fine. :)&lt;/p&gt;

&lt;p&gt;One thing: the code as-is (at least, when I downloaded it about 2-3 months ago) doesn&#039;t guarantee test teardown because it is only called in the try{} block. I moved this line (near line 285):&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;fixture= clone(c);&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to just above the try{} block, and added a finally{} that will run fixture.teardown(). Before doing this I would have a test fail and then have every test after it error out because the folders and files I was creating in setup() already existed. Now failures/errors only affect the individual test, not the entire object.&lt;/p&gt;

&lt;p&gt;Another mod was to add &quot;expected: foo, actual: bar&quot; to assert failure messages (using a formatting function expectedVsActual()) so I can see at a glance what really happened.&lt;/p&gt;

&lt;p&gt;I also added some file asserts (assertFileExists and such) and tossed in several of the script.aculo.us asserts (assertMatch, assertInstanceOf, benchmark, etc) as well, just for good measure. :)&lt;/p&gt;

&lt;p&gt;Thanks for the great library!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Love this. Because of this I am able to actually write &#8220;real&#8221; command-line javascript code and unit test it properly. On Windows, run from a command line in jEdit to boot! So yes your WshTestRunner runs just fine. :)</p>

<p>One thing: the code as-is (at least, when I downloaded it about 2-3 months ago) doesn&#8217;t guarantee test teardown because it is only called in the try{} block. I moved this line (near line 285):</p>

<blockquote>
  <p>fixture= clone(c);</p>
</blockquote>

<p>to just above the try{} block, and added a finally{} that will run fixture.teardown(). Before doing this I would have a test fail and then have every test after it error out because the folders and files I was creating in setup() already existed. Now failures/errors only affect the individual test, not the entire object.</p>

<p>Another mod was to add &#8220;expected: foo, actual: bar&#8221; to assert failure messages (using a formatting function expectedVsActual()) so I can see at a glance what really happened.</p>

<p>I also added some file asserts (assertFileExists and such) and tossed in several of the script.aculo.us asserts (assertMatch, assertInstanceOf, benchmark, etc) as well, just for good measure. :)</p>

<p>Thanks for the great library!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Czepiel</title>
		<link>http://nerd.metrocat.org/2006/07/unit-testing-with-javascript-and-textmate/comment-page-1#comment-582</link>
		<dc:creator>Mike Czepiel</dc:creator>
		<pubDate>Wed, 13 Sep 2006 06:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://nerd.newburyportion.com/2006/07/unit-testing-with-javascript-and-textmate#comment-582</guid>
		<description>&lt;p&gt;Honestly haven&#039;t gotten a chance to try your bundle. But it was wierd; I was in the ##textmate irc rom asking about doing this exact thing regarding javascriptlint when I stumbled upon your bundle.&lt;/p&gt;

&lt;p&gt;I&#039;ll setup your bundle properly when I get back to work. But anyway. Given the essential nature of this tool I&#039;d look into working this into the textmate bundles repository somehow. Not sure what it would take to get SVN access.&lt;/p&gt;

&lt;p&gt;Anyway, thanks for your efforts.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Honestly haven&#8217;t gotten a chance to try your bundle. But it was wierd; I was in the ##textmate irc rom asking about doing this exact thing regarding javascriptlint when I stumbled upon your bundle.</p>

<p>I&#8217;ll setup your bundle properly when I get back to work. But anyway. Given the essential nature of this tool I&#8217;d look into working this into the textmate bundles repository somehow. Not sure what it would take to get SVN access.</p>

<p>Anyway, thanks for your efforts.</p>]]></content:encoded>
	</item>
</channel>
</rss>
