@t7/utils
Version:
Utility methods for T7 components.
27 lines (21 loc) • 525 B
JavaScript
// Dependencies.
import { trim } from './'
// Describe test.
describe('trim', () => {
// ================================
// Test for `null` and `undefined`.
// ================================
it('handles `null` and `undefined`', () => {
expect(trim(null))
.toBe('')
expect(trim(undefined))
.toBe('')
})
// ======================
// Test for string value.
// ======================
it('handles string value', () => {
expect(trim(' FOO BAR '))
.toBe('FOO BAR')
})
})