<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web/static/tests/helpers/test_utils_tests.js, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[IMP] web:tests: patch `Date.now`</title>
<updated>2019-08-13T07:57:10+00:00</updated>
<author>
<name>Alexandre Kühn</name>
<email>aku@odoo.com</email>
</author>
<published>2019-08-01T09:22:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7d8977182bb8acaa68d6b055db619f94196edbfd'/>
<id>7d8977182bb8acaa68d6b055db619f94196edbfd</id>
<content type='text'>
Before this commit, when we use `testUtils.patchDate`,
the function `Date.now` was not using the fake date for reference.

This is an issue with the lib momentjs, which instantiate the
current date as follow:

```
new Date(Date.now())
```

Because of this, we were handling patched date and unpatched moment
objects.

Task-ID 1902848</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, when we use `testUtils.patchDate`,
the function `Date.now` was not using the fake date for reference.

This is an issue with the lib momentjs, which instantiate the
current date as follow:

```
new Date(Date.now())
```

Because of this, we were handling patched date and unpatched moment
objects.

Task-ID 1902848</pre>
</div>
</content>
</entry>
</feed>
