summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/path.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec/path.js b/spec/spec/path.js
index 38ec932..85d596e 100644
--- a/spec/spec/path.js
+++ b/spec/spec/path.js
@@ -159,6 +159,19 @@ describe('Path', function() {
expect(path.node.getAttribute('d')).toBe('M 50 60 A 60 60 0 0 0 50 -60 H 100 V 100 L 20 30 C 10 20 30 40 50 60')
})
})
+
+ describe('length()', function() {
+ it('gets the total length of the path', function() {
+ expect(path.length()).toBe(path.node.getTotalLength())
+ })
+ })
+
+ describe('pointAt()', function() {
+ it('gets a point at given length', function() {
+ expect(path.pointAt(100)).toEqual(path.node.getPointAtLength(100))
+ })
+ })
+
})