I am trying to test the actual output from a date string conversion with angular 8, and Karma.
In my app.module I use the syntax:
registerLocaleData(localeNl, 'nl');
In my template I use
{{date | date: 'MMMM yyyy'}}
When I unit test the pipe conversion with :
element = fixture.nativeElement;
content = element.querySelector('.content');
expect(content.innerText).toContain('mei 2020')
I get the Karma error that the innerText is "May 2020" and not "mei 2020" but in the actual angular application it renders the text correctly "mei 2020". So How can I get the Karma environment to use the same locale as the application?