<?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: How to mock and unit test moment.js	</title>
	<atom:link href="/how-to-mock-and-unit-test-moment-js/feed/" rel="self" type="application/rss+xml" />
	<link>/how-to-mock-and-unit-test-moment-js/</link>
	<description>Always be learning</description>
	<lastBuildDate>Sat, 08 Sep 2018 00:57:00 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>
		By: megabyte01		</title>
		<link>/how-to-mock-and-unit-test-moment-js/#comment-27</link>

		<dc:creator><![CDATA[megabyte01]]></dc:creator>
		<pubDate>Sat, 08 Sep 2018 00:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://ec2-52-36-187-147.us-west-2.compute.amazonaws.com/how-to-mock-and-unit-test-moment-js/#comment-27</guid>

					<description><![CDATA[Thanks for sharing! jasmine.clock().mockDate(time) was exactly what I needed!]]></description>
			<content:encoded><![CDATA[<p>Thanks for sharing! jasmine.clock().mockDate(time) was exactly what I needed!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Leandros		</title>
		<link>/how-to-mock-and-unit-test-moment-js/#comment-18</link>

		<dc:creator><![CDATA[Leandros]]></dc:creator>
		<pubDate>Tue, 21 Mar 2017 21:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://ec2-52-36-187-147.us-west-2.compute.amazonaws.com/how-to-mock-and-unit-test-moment-js/#comment-18</guid>

					<description><![CDATA[Just stumbled onto this and I have to disagree with this implementation completely.
What is happening here is that the unit test is relying on something which exists outside of the unit&#039;s world which is something that you should never care about. Instead of the unit test using the actual moment implementation you should stub getCurrentTime and return what you want in order to unit test this. This way you can test various scenarios which could be time sensitive.]]></description>
			<content:encoded><![CDATA[<p>Just stumbled onto this and I have to disagree with this implementation completely.<br />
What is happening here is that the unit test is relying on something which exists outside of the unit&#8217;s world which is something that you should never care about. Instead of the unit test using the actual moment implementation you should stub getCurrentTime and return what you want in order to unit test this. This way you can test various scenarios which could be time sensitive.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
