Descriptions containing the letters 'end' get mangled
Reported by dwg | April 18th, 2009 @ 10:23 PM
I have a spec described as
it 'should extend ...'
Which gets changed to
'should ext}); ...'
By changing the following line
replace(/end(?= |\n|$)/gm, '});').
to
replace(/\send(?= |\n|$)/gm, '});').
fixes the problem.
Comments and changes to this ticket
-
dwg April 19th, 2009 @ 12:21 PM
Update: the line should be
replace(/(?:\s|^)end(?=\s|$)/gm, '});').
Additionally, the line
replace(/^(?: *)(before_each|after_each|before|after)(?= |\n|$)/gm, 'this.addHook("$1", function(){').
assumes that indentation is spaces (I use tabs), should be
replace(/^(?:\s*)(before_each|after_each|before|after)(?=\s|$)/gm, 'this.addHook("$1", function(){').
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Tiny, full-featured JavaScript BDD framework.