title: Jest: Function to format currency values
body: <p>I'm having the following error when testing a function to format currency values</p>
  <p>Function:</p>
  <pre><code>const brlCurrencyFormatting = (value) =&gt; {
    const options = {style: 'currency', currency: 'BRL'};
    return value.toLocaleString('pt-BR', options);
  }
  </code></pre>
  <p>Test:</p>
  <pre><code>test('Should format the number 9000 and return R$ 9.000,00', () =&gt; {
      const value = 9000;
      const formattedValue = brlCurrencyFormatting(value);
      expect(formattedValue).toBe('R$ 9.000,00');
    });
  </code></pre>
  <p>Error:</p>
  <pre><code>expect(received).toBe(expected) // Object.is equality
  
      Expected: &quot;R$ 9.000,00&quot;
      Received: &quot;R$ 9.000,00&quot;
  
        5 |     const value = 9000;
        6 |     const formattedValue = brlCurrencyFormatting(value);
      &gt; 7 |     expect(formattedValue).toBe('R$ 9.000,00');
          |                            ^
        8 |   });
        9 | });
  </code></pre>