Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/svg.js/spec/spec/ drwxrwxr-x | |
| Viewing file: Select action/file-type: describe('TextPath', function() {
var text
, data = 'M 100 200 C 200 100 300 0 400 100 C 500 200 600 300 700 200 C 800 100 900 100 900 100'
beforeEach(function() {
text = draw.text('We go up, then we go down, then up again')
})
afterEach(function() {
draw.clear()
})
describe('path()', function() {
it('returns the text element', function() {
expect(text.path(data)).toBe(text)
})
it('creates a textPath node in the text element', function() {
text.path(data)
expect(text.node.firstChild.nodeName).toBe('textPath')
})
})
describe('textPath()', function() {
it('creates a reference to the textPath', function() {
expect(text.path(data).textPath() instanceof SVG.TextPath).toBe(true)
})
})
describe('track()', function() {
it('creates a reference to the path', function() {
expect(text.path(data).track() instanceof SVG.Path).toBe(true)
})
})
describe('array()', function() {
it('return the path array of the underlying path', function() {
expect(text.path(data).array()).toEqual(new SVG.PathArray(data))
})
it('return null if there is no underlying path', function () {
expect(text.array()).toBe(null)
})
})
describe('plot()', function() {
it('change the array of the underlying path when a string is passed', function() {
expect(text.path().plot(data)).toBe(text)
expect(text.array()).toEqual(new SVG.PathArray(data))
})
it('do nothing when a string is passed and there is no underlying path', function() {
expect(text.plot(data)).toBe(text)
expect(text.array()).toEqual(null)
})
it('return the path array of the underlying path when no arguments is passed', function () {
text.path(data)
expect(text.plot()).toBe(text.array())
expect(text.plot()).not.toBe(null)
})
it('return null when no arguments is passed and there is no underlying path', function () {
expect(text.plot()).toBe(null)
})
})
})
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]-- |