creating a test for problems with the detection of replaced text using javascript