I am working on an angular(2.4.0)/typescript application that uses a custom currency pipe which internally uses angular's built-in CurrencyPipe for formatting inputted currency strings for both 'en-CA' and 'fr-CA' Canadian locales. While writing unit tests for the french case, for the happy-path case of expecting formatted output for a given valid input string,
describe('for French locale', () => {
// get the mock custom currency pipe instance for 'fr-CA' locale as 'currencyPipeForFR'
it('should be formatted for fr-CA locale', () => {
expect(currencyPipeForFR.transform('7500')).toBe('7 500 $');
});
});
I am getting this error,
Expected '7 500 $' to be '7 500 $'.
I did check the instance of of the transformed result and it is a String. What am I missing? Any help would be appreciated.