Seems a bit dangerous to do this without restoring `indexOf` when the test is over.