<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>marcus ramberg &#187; Testing</title>
	<atom:link href="http://marcus.nordaaker.com/tag/testing/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcus.nordaaker.com</link>
	<description>nordaaker</description>
	<lastBuildDate>Sat, 31 Dec 2011 23:20:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Testing JavaScript from Perl</title>
		<link>http://marcus.nordaaker.com/2009/11/testing-javascript-from-perl/</link>
		<comments>http://marcus.nordaaker.com/2009/11/testing-javascript-from-perl/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 11:57:40 +0000</pubDate>
		<dc:creator>marcus</dc:creator>
				<category><![CDATA[Article]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://marcus.nordaaker.com/?p=3142</guid>
		<description><![CDATA[If you want to write tests for your JavaScript code from Perl, Claes&#8217; module Test::JavaScript::More comes in handy. This module works by evaling everything from the use line as JavaScript. Of course, now you&#8217;re mixing two languages in one file, which is not going to make any of your syntax validators happy. However, loading it [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to write tests for your JavaScript code from Perl, Claes&#8217; module <a href="http://search.cpan.org/~claesjac/JavaScript-1.12/lib/Test/JavaScript/More.pm">Test::JavaScript::More</a> comes in handy. This module works by evaling everything from the use line as JavaScript. Of course, now you&#8217;re mixing two languages in one file, which is not going to make any of your syntax validators happy. However, loading it like this will please both perl and jslint:</p>
<pre>
m| /* |; # Comment out JavaScript
use Test::JavaScript::More;
__END__ = '';  // It's is all JS from here. */
ok(1,'Success!');
</pre>
<p>One final note. I had some problems building the cpan module of JavaScript on OSX with Spidermonkey from ports. If you have the same problem, get the <a href="http://github.com/claesjac/javascript">latest and greatest version</a> from GitHub, which fixes this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://marcus.nordaaker.com/2009/11/testing-javascript-from-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

