react-native-integrate
Version:
Automate integration of additional code into React Native projects
22 lines (21 loc) • 820 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const findLineTools_1 = require("../../../utils/findLineTools");
describe('findLineStart', () => {
it('should get line start', () => {
const index = (0, findLineTools_1.findLineStart)('0\n234\n6', 4);
expect(index).toBe(2);
});
it('should get line start with min index', () => {
const index = (0, findLineTools_1.findLineStart)('0\n234\n6', 4, 3);
expect(index).toBe(3);
});
it('should get line end', () => {
const index = (0, findLineTools_1.findLineEnd)('0\n234\n6', 2);
expect(index).toBe(5);
});
it('should get line end with max index', () => {
const index = (0, findLineTools_1.findLineEnd)('0\n234\n6', 2, 3);
expect(index).toBe(3);
});
});