summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-19 20:45:07 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-19 20:45:07 +0100
commit9943813f3779d2ede508a90dadd087fc0ad12f1f (patch)
tree9e0d2c1008ed540936ca9675152f6ba79ff4bd64 /spec
parentd5a8faa4d06d2664a7748ea570937751ef5271d5 (diff)
downloadsvg.js-9943813f3779d2ede508a90dadd087fc0ad12f1f.tar.gz
svg.js-9943813f3779d2ede508a90dadd087fc0ad12f1f.zip
renamed `Doc` to `Svg` according to (#932)
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/adopter.js4
-rw-r--r--spec/spec/boxes.js2
-rw-r--r--spec/spec/doc.js12
-rw-r--r--spec/spec/element.js2
-rw-r--r--spec/spec/svg.js16
5 files changed, 18 insertions, 18 deletions
diff --git a/spec/spec/adopter.js b/spec/spec/adopter.js
index 90e0411..38d55f4 100644
--- a/spec/spec/adopter.js
+++ b/spec/spec/adopter.js
@@ -9,9 +9,9 @@ describe('Adopter', function() {
radialGradient = SVG('#inlineSVG').find('radialGradient')[0]
})
- describe('with SVG.Doc instance', function() {
+ describe('with SVG.Svg instance', function() {
it('adopts the main svg document when parent() method is called on first level children', function() {
- expect(path.parent() instanceof SVG.Doc).toBeTruthy()
+ expect(path.parent() instanceof SVG.Svg).toBeTruthy()
})
it('defines a xmlns attribute', function() {
expect(path.parent().node.getAttribute('xmlns')).toBe(SVG.ns)
diff --git a/spec/spec/boxes.js b/spec/spec/boxes.js
index 2fcbd8b..d5581b2 100644
--- a/spec/spec/boxes.js
+++ b/spec/spec/boxes.js
@@ -182,7 +182,7 @@ describe('Boxes', function() {
})
- it('returns the elements box in coordinates of given element (doc)', function() {
+ it('returns the elements box in coordinates of given element (root)', function() {
var box = rect.rbox(draw)
expect(window.roundBox(box)).toEqual(jasmine.objectContaining({
diff --git a/spec/spec/doc.js b/spec/spec/doc.js
index f82f1cb..a875906 100644
--- a/spec/spec/doc.js
+++ b/spec/spec/doc.js
@@ -1,4 +1,4 @@
-describe('Doc', function() {
+describe('Svg', function() {
describe('create()', function(){
it('doenst alter size when adopting width SVG()', function() {
@@ -12,11 +12,11 @@ describe('Doc', function() {
expect(draw instanceof SVG.Container).toBe(true)
})
- it('is an instance of SVG.Doc', function() {
- expect(draw instanceof SVG.Doc).toBe(true)
+ it('is an instance of SVG.Svg', function() {
+ expect(draw instanceof SVG.Svg).toBe(true)
})
- it('returns itself as Doc when root', function() {
+ it('returns itself as Svg when root', function() {
expect(draw.doc()).toBe(draw)
})
@@ -34,7 +34,7 @@ describe('Doc', function() {
})
describe('isRoot()', function() {
- it('returns true when the doc is not attached to dom', function() {
+ it('returns true when the Svg is not attached to dom', function() {
expect(SVG().isRoot()).toBe(true)
})
it('returns true when its outer element is not an svg element', function () {
@@ -49,7 +49,7 @@ describe('Doc', function() {
})
describe('remove()', function() {
- it('removes the doc from the dom only if doc is not root element', function() {
+ it('removes the Svg from the dom only if Svg is not root element', function() {
var cnt = window.document.querySelectorAll('svg').length
draw.remove()
if(parserInDoc){
diff --git a/spec/spec/element.js b/spec/spec/element.js
index 9afedc6..96d512b 100644
--- a/spec/spec/element.js
+++ b/spec/spec/element.js
@@ -633,7 +633,7 @@ describe('Element', function() {
it('contains the parent which matches type', function() {
var group = draw.group()
, rect = group.rect(100,100)
- expect(rect.parent(SVG.Doc)).toBe(draw)
+ expect(rect.parent(SVG.Svg)).toBe(draw)
})
it('contains the parent which matches selector', function() {
var group1 = draw.group().addClass('test')
diff --git a/spec/spec/svg.js b/spec/spec/svg.js
index 6acbda4..acdd686 100644
--- a/spec/spec/svg.js
+++ b/spec/spec/svg.js
@@ -18,8 +18,8 @@ describe('SVG', function() {
wrapperHTML.parentNode.removeChild(wrapperHTML)
})
- it('creates an instanceof SVG.Doc without any argument', function() {
- expect(SVG() instanceof SVG.Doc).toBe(true)
+ it('creates an instanceof SVG.Svg without any argument', function() {
+ expect(SVG() instanceof SVG.Svg).toBe(true)
expect(SVG().node.nodeName).toBe('svg')
})
@@ -35,15 +35,15 @@ describe('SVG', function() {
expect(el.node).toBe(wrapperHTML)
})
- it('creates an instanceof SVG.Doc with svg node', function() {
+ it('creates an instanceof SVG.Svg with svg node', function() {
var doc = SVG(wrapper)
- expect(doc instanceof SVG.Doc).toBe(true)
+ expect(doc instanceof SVG.Svg).toBe(true)
expect(doc.node).toBe(wrapper)
})
- it('creates new SVG.Doc when called with css selector pointing to svg node', function() {
+ it('creates new SVG.Svg when called with css selector pointing to svg node', function() {
var doc = SVG('#testSvg')
- expect(doc instanceof SVG.Doc).toBe(true)
+ expect(doc instanceof SVG.Svg).toBe(true)
expect(doc.node).toBe(wrapper)
})
@@ -52,10 +52,10 @@ describe('SVG', function() {
expect(SVG(rect).node).toBe(rect)
})
- it('creates an instanceof SVG.Doc when importing a whole svg', function() {
+ it('creates an instanceof SVG.Svg when importing a whole svg', function() {
var doc = SVG('<svg width="200"><rect></rect></svg>')
- expect(doc instanceof SVG.Doc).toBe(true)
+ expect(doc instanceof SVG.Svg).toBe(true)
expect(doc.node.nodeName).toBe('svg')
expect(doc.width()).toBe(200)
expect(doc.get(0).node.nodeName).toBe('rect')