Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Commit

Permalink
Improve test for adding idPrefix to xlink:href
Browse files Browse the repository at this point in the history
While adding more things to this test, I noticed that the assertion for
idPrefix insertion in xlink:href attributes was lacking the actual
prefix. Adding it should make this bit of code more robust, which is
nice because I'm about to make some changes.
  • Loading branch information
trotzig committed Sep 11, 2017
1 parent d2c7218 commit e5a07d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/svg-inline-loader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('getExtractedSVG()', function(){

assert.isTrue( processedStyleInsertedSVG.match(/test\.prefix-foo/g).length === 3 );
// // replaces xlink:href=
assert.isTrue( processedStyleInsertedSVG.match(/xlink:href=/g).length === 1 );
assert.isTrue( processedStyleInsertedSVG.match(/xlink:href="#test.prefix-foo"/g).length === 1 );
// // replaces url(#foo)
assert.isTrue( processedStyleInsertedSVG.match(/url\(#test\.prefix-foo\)/g).length === 1 );
});
Expand Down

0 comments on commit e5a07d1

Please sign in to comment.