Closed vmx closed 4 years ago
@alanshaw I also wasn't sure what this code was supposed to test, so I asked the original author @olizilla. I've added a comment explaining it.
The tests were incorrect, the intention was that the string
and buffer
properties where internal implementation details, and would be lazily set at different times depending on how the instance was initiated so should not be trivially exposed or relied upon by the caller.
I should have just called them _buffer
and _string
to be more in line with old idomatic expectations.
The code needs some slight changes as the linting rules got stricter.