2020-09-02 10:44:33 +02:00
|
|
|
const filter = require('../src/filter/breaks')
|
|
|
|
const assert = require('assert')
|
|
|
|
|
|
|
|
describe('Check "breaks"', () => {
|
2023-03-31 17:53:50 +02:00
|
|
|
it('Should return empty string', () => {
|
|
|
|
assert.equal(filter("\n"), "")
|
|
|
|
})
|
2020-09-02 10:44:33 +02:00
|
|
|
|
2023-03-31 17:53:50 +02:00
|
|
|
it('Should return empty string', () => {
|
|
|
|
assert.equal(filter("\r"), "")
|
|
|
|
})
|
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 "foobar"', () => {
|
|
|
|
assert.equal(filter("\r\nfoo\nbar\r\n"), "foobar")
|
|
|
|
})
|
2020-09-02 10:44:33 +02:00
|
|
|
});
|