lines-around.js 382 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
import { getLinesAround } from '../utils/getLinesAround';

const arr = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight'];

test('should return lines around from a string', () => {
  expect(getLinesAround(4, 2, arr)).toMatchSnapshot();
});

test('should return lines around from an array', () => {
  expect(getLinesAround(4, 2, arr.join('\n'))).toMatchSnapshot();
});