Issue
I am trying to test translation in angular with jasmine. I am using angular localize but I do not know how to use it inside jasmine/karma unit tests. I trigger language change via URL parameter which is suitable for e2e tests where it works fine. Thanks for any suggestions on how to change language in jasmine.
Solution
solved.
tsconfig
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
spec file
import { loadTranslations } from '@angular/localize';
import de from '../assets/de.json';
loadTranslations(de);
Answered By - Juraj Jakubov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.