UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

10 lines (9 loc) 323 B
import { insertAtIndex } from '..'; describe(`insertAtIndex`, () => { it(`should insert a string value at a given index in a source string`, () => { const source = `<strong>`; const value = `/`; const index = 1; expect(insertAtIndex(source, value, index)).toBe(`</strong>`); }); });