Handle null/undefined cases for price

This commit is contained in:
Jean-Baptiste Bellet
2021-06-01 11:40:02 +02:00
parent 7f9179193e
commit f73e5c74fb
2 changed files with 9 additions and 0 deletions

View File

@@ -89,3 +89,10 @@ describe 'convert string to number with configurated currency', ->
it "handle integer number with no thousands separator", ->
expect(filter("1000")).toEqual 1000
describe "handle null/undefined case", ->
it "null case", ->
expect(filter(null)).toEqual null
it "undefined case ", ->
expect(filter(undefined)).toEqual null