summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
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