scraper/test/trim.test.js
Simon Vieille 62da111aca
Some checks failed
Gitnet/scraper/pipeline/head There was a failure building this commit
add tests
2020-09-02 10:44:33 +02:00

21 lines
472 B
JavaScript

const filter = require('../src/filter/trim')
const assert = require('assert')
describe('Check "trim"', () => {
it('Should return ""', () => {
assert.equal(filter(""), "")
})
it('Should return ""', () => {
assert.equal(filter(" "), "")
})
it('Should return "foo"', () => {
assert.equal(filter(" foo "), "foo")
})
it('Should return "foo bar"', () => {
assert.equal(filter(" foo bar \n"), "foo bar")
})
});