2020-09-02 10:44:33 +02:00
|
|
|
const filter = require('../src/filter/trim')
|
|
|
|
const assert = require('assert')
|
|
|
|
|
|
|
|
describe('Check "trim"', () => {
|
2023-03-31 17:53:50 +02:00
|
|
|
it('Should return ""', () => {
|
|
|
|
assert.equal(filter(""), "")
|
|
|
|
})
|
2020-09-02 10:44:33 +02:00
|
|
|
|
2023-03-31 17:53:50 +02:00
|
|
|
it('Should return ""', () => {
|
|
|
|
assert.equal(filter(" "), "")
|
|
|
|
})
|
2020-09-02 10:44:33 +02:00
|
|
|
|
2023-03-31 17:53:50 +02:00
|
|
|
it('Should return "foo"', () => {
|
|
|
|
assert.equal(filter(" foo "), "foo")
|
|
|
|
})
|
2020-09-02 10:44:33 +02:00
|
|
|
|
2023-03-31 17:53:50 +02:00
|
|
|
it('Should return "foo bar"', () => {
|
|
|
|
assert.equal(filter(" foo bar \n"), "foo bar")
|
|
|
|
})
|
2020-09-02 10:44:33 +02:00
|
|
|
});
|