javascript - Mysterious '...' at end of my strings, although it doesn't seem to be a char? -
i running unit tests on javascript, however, following test failing:
it('should pass tags without code clean through', function () { //some logic expect(processed_content).tobe(data); }); however, getting error shown below. both strings seem identical, , when copy , pasted online diff checker reports identical.
1) test migrator should pass tags without code clean through 1.1) expected '--- title: location description: how work geographical location data. --- import module in code use: {% nativescript %} javascript var geolocation = require("nativescript-geolocation"); ' '--- title: location description: how work geographical location data. --- import module in code use: {% nativescript %} javascript var geolocation = require("nativescript-geolocation"); '. however, when tried comparing processed_content.split('') , data.split('') , got:
so can see there difference in how end of file being dealt during processing, in use case should read file , write straight back. why there ... @ end of original file , .. @ end of processed version? more point, how can ignore quirk in test, doesn't seem char, isn't inside inverted commas?
nb: have tried processed_content.split('').slice(0, processed_content.length - 1) doesn't seem work. ideas?
update:
thanks suggestion try .trim() unfortunately doesn't help, if call processed_content.trim().split(''), still ... , .. (although function kill commas seeing).
still anymore ideas appreciated still biting me ...

Comments
Post a Comment