build-your-own-angularjs
build-your-own-angularjs copied to clipboard
P128: Unescaped ' character in string
trafficstars
The first test case in this page starts with
it('inherits the parent's properties', function() {
If you copy and paste this (as I did) then this will cause a problem because the ' character needs to be escaped.
Suggested fix:
it('inherits the parent\'s properties', function() {
or
it("inherits the parent's properties", function() {
I prefer the former because it is consistent with the rest of the test examples for scope.
If you really don't want to confuse the reader by throwing in escaped characters the test name could simply be 'inherits the properties of the parent'.