aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-11-04 02:43:53 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-11-04 02:43:53 +0100
commitc271f48c64e859367bdd22321dbfc2e96eefc0af (patch)
tree7bc5223f6e4f649c7487530c21d9cd209dc97a7e /spec
parent2bcd57ca3776a026786c0812206a17d4f1aeae19 (diff)
downloadsvg.js-c271f48c64e859367bdd22321dbfc2e96eefc0af.tar.gz
svg.js-c271f48c64e859367bdd22321dbfc2e96eefc0af.zip
fixed return value of `text()` after import/clone (#393)
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/text.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/spec/spec/text.js b/spec/spec/text.js
index 91ec7ae..39fba10 100644
--- a/spec/spec/text.js
+++ b/spec/spec/text.js
@@ -123,9 +123,9 @@ describe('Text', function() {
text.text('It is\nJUST\na bear!')
expect(text.node.childNodes.length).toBe(3)
})
- it('stores the text value in the content reference', function() {
+ it('restores the content from the dom', function() {
text.text('It is\nJUST\na bear!')
- expect(text.content).toBe('It is\nJUST\na bear!')
+ expect(text.text()).toBe('It is\nJUST\na bear!')
})
it('gets the given content of a text element without an argument', function() {
text.text('It is another bear!')
@@ -155,9 +155,9 @@ describe('Text', function() {
expect(text.node.childNodes.length).toBe(1)
expect(text.node.childNodes[0].nodeValue).toBe('It is not a bear!')
})
- it('stores the text value in the content reference', function() {
+ it('restores the content from the dom', function() {
text.plain('Just plain text!')
- expect(text.content).toBe('Just plain text!')
+ expect(text.text()).toBe('Just plain text!')
})
})
@@ -185,10 +185,6 @@ describe('Text', function() {
text.clear()
expect(text.node.childNodes.length).toBe(0)
})
- it('clears the stored content value', function() {
- text.text('Stored locally.')
- expect(text.content).toBe('Stored locally.')
- })
})
describe('lines()', function() {