import { Strings } from './strings' ; describe ( 'Strings' , ( ) => { describe ( 'replaceFirst' , ( ) => { it ( 'should replace the first occurrence of an old value by a new value' , ( ) => { const sourceString = `A string 'with' single 'quotes'` ; const newString = Strings . replaceFirst ( sourceString , `'` , `''` ) ; expect ( newString ) . toEqual ( `A string ''with' single 'quotes'` ) ; } ) ; } ) ; } ) ;