summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-06-25 15:27:31 +0200
committerwout <wout@impinc.co.uk>2014-06-25 15:27:31 +0200
commit859cf9fce39ea36ae40af8b828d4683b79746dee (patch)
tree2995d43addc248c70901f0c3231a7399c32aa7b1 /spec
parent566407cb328263f1bf155401015da5f269d3dcb7 (diff)
downloadsvg.js-859cf9fce39ea36ae40af8b828d4683b79746dee.tar.gz
svg.js-859cf9fce39ea36ae40af8b828d4683b79746dee.zip
Added more versatility to adopter
Diffstat (limited to 'spec')
-rwxr-xr-xspec/index.html1
-rw-r--r--spec/spec/adopter.js7
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/index.html b/spec/index.html
index 060e076..94f13db 100755
--- a/spec/index.html
+++ b/spec/index.html
@@ -20,6 +20,7 @@
<body>
<svg height="0" width="0" id="inlineSVG">
+ <desc>Some description</desc>
<path id="lineAB" d="M 100 350 l 150 -300" stroke="red" stroke-width="3" fill="none" />
<path id="lineBC" d="M 250 50 l 150 300" stroke="red" stroke-width="3" fill="none" />
<path d="M 175 200 l 150 0" stroke="green" stroke-width="3" fill="none" />
diff --git a/spec/spec/adopter.js b/spec/spec/adopter.js
index 522802f..0136d0e 100644
--- a/spec/spec/adopter.js
+++ b/spec/spec/adopter.js
@@ -49,6 +49,13 @@ describe('Adopter', function() {
expect(polygon.array() instanceof SVG.PointArray).toBeTruthy()
})
})
+
+ describe('with node that has no matching svg.js class', function() {
+ it('wraps the node in the base SVG.Element class', function() {
+ var desc = SVG.get('inlineSVG').select('desc').first()
+ expect(desc instanceof SVG.Element).toBeTruthy()
+ })
+ })
}) \ No newline at end of file