vendredi 9 septembre 2016

Configure browser language for PhantomJS in Jasmine Unit Test

I am using Jasmine with Karma for unit testing Angular2 application. In the Karma config file I am using PhantomJS as the browser to run the tests.

browsers: ['PhantomJS']

I am using ng2-translate module for running translations on my texts with below piece of code:

userLang = navigator.language.split('-')[0];

Is it possible to configure PhantomJS to test different translations in the test suite?

If yes, then what is the procedure?

Aucun commentaire:

Enregistrer un commentaire