以下测试失败:
test('',() => {
const result = new Intl.NumberFormat('sv-SE',{
style: 'currency',currency: 'SEK',minimumFractionDigits: 0,maximumFractionDigits: 0,}).format(1000)
expect(result).toEqual('1 000 kr')
})
它返回以下提示:
Expected: "1 000 kr"
Received: "1 000 kr"
我也尝试过使用.toBe()
进行断言,得出相同的结果。
断言上面两个字符串的正确方法是什么?