Fix error message string substitutions #570

Merged
merged 2 commits into from Dec 14, 2015

Projects

None yet

2 participants

@jurko-gospodnetic
Contributor

This is a fix for issue #560.

Tests included.

I noticed the getMessage tests currently seem to be missing several getMessage() implementation features (e.g. how different objects get serialized to strings), but I did not go into implementing those here.

@jurko-gospodnetic jurko-gospodnetic split up getMessage() tests f73d026
@jurko-gospodnetic jurko-gospodnetic fix error message tag substitution
String.prototype.replace() had some extra undesireable substitution behaviour
when it replaces a tag with a string containing some internal tags like `$$`,
or `$'`.

For more detailed information see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter
568fc1a
@keithamus
Member

Great work @jurko-gospodnetic 😄

@keithamus keithamus merged commit a1e8373 into chaijs:master Dec 14, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jurko-gospodnetic jurko-gospodnetic deleted the unknown repository branch Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment