Strings are missing quotations in detected comparisons.
This is especially frustrating if they contain digits and/or spaces.
Example
Then clause #7 `visibleText($('<a><a style="display:none">x</a> y</a>')) === ' y'` failed by returning false
This comparison was detected:
visibleText($('<a><a style="display:none">x</a> y</a>')) === ' y'
y === y
Situation
Strings are missing quotations in detected comparisons.
This is especially frustrating if they contain digits and/or spaces.
Example
Proposed simple solution:
Just put a
"'" + left + "'"
somewhere in here: https://github.com/searls/jasmine-given/blob/master/app/js/jasmine-given.coffee#L179Proposed nice solution:
Do it a little more human+machine friendly way like this: https://github.com/Wizek/Tree/blob/master/src/tree.js#L163-L179
(Example of this in action: https://github.com/Wizek/Tree/blob/master/test/test.js#L123-L128)
This way the result is always valid (copy-pastable) JavaScript.