Skip to content

Conversation

@susomartinez
Copy link

As the title says, currently an XML like:

<tag>
    Text content
</tag>

won't be equal to

<tag>Text content</tag>

So I just added the option to use the 'deep' flag in order to ignore whitespace at the beginning and end of the text nodes. It is done just setting to true the trim option in the xml2js parser.

Now, you can use expect(formattedXml).xml.to.deep.equal(unformattedXml) in order to ignore the whitespace or keep using expect(formattedXml).xml.to.not.equal(unformattedXml) in order to taking it into account.

@krampstudio
Copy link
Owner

I'll review and merge that

@krampstudio krampstudio merged commit 63188e9 into krampstudio:master Dec 30, 2014
@krampstudio
Copy link
Owner

published in 0.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants