mercredi 19 avril 2017

Angular2 datepipe wrong formatted with PhantomJS

I'm trying to write unit tests with Karma for PhantomJS browser but I fail using the DatePipe provided by Angular2

Here is the template i'm using :

<span class="hour"></span>
<span> : </span>
<span class="minutes"></span>
<span> : </span>
<span class="seconds"></span>

Chrome and Firefox are displaying :

10
:
39
:
37

which is perfect !

PhantomJS with 'require('intl/locale-data/jsonp/en.js')' in karma-shim.js displays :

10
:
10:39 AM
:
39:37

PhantomJS with 'require('intl/locale-data/jsonp/fr.js')' in karma-shim.js displays :

10
:
10:39
:
39:37

I would like to be able to display the correct format with fr.js. Any idea ?

Aucun commentaire:

Enregistrer un commentaire