Skip to content

Commit

Permalink
test: add more examples in validation pass
Browse files Browse the repository at this point in the history
  • Loading branch information
chessurisme committed Jul 31, 2024
1 parent 33a6ef3 commit a387b89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utilities/__tests__/sanitize-value.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ describe('sanitizeValue', () => {
expect(sanitizeValue('test', 'string')).toBe('test')
expect(sanitizeValue(123, 'number')).toBe(123)
expect(sanitizeValue([], 'array')).toEqual([])
expect(sanitizeValue(null, 'null')).toBeNull()
expect(sanitizeValue({}, 'object')).toEqual({})
expect(sanitizeValue(false, 'boolean')).toBe(false)
expect(sanitizeValue(document.createElement('div'), 'HTMLElement')).toBeInstanceOf(HTMLElement)
expect(sanitizeValue(null, 'null')).toBeNull()
})
})

0 comments on commit a387b89

Please sign in to comment.