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('Tspan', function() {
var text, tspan
beforeEach(function() {
text = draw.text(loremIpsum)
tspan = text.tspan('Hello World')
})
afterEach(function() {
draw.clear()
})
describe('newLine()', function() {
it('converts the tspan to a line', function() {
tspan = text.tspan('Hello World')
expect(tspan.newLine().dom.newLined).toBeTruthy()
})
})
describe('text()', function() {
it('returns the text of the tspan without newline when not newlined', function() {
tspan = text.tspan('Hello World')
expect(tspan.text()).toBe('Hello World')
})
it('returns the text of the tspan with newline when newlined', function() {
tspan = text.tspan('Hello World').newLine()
expect(tspan.text()).toBe('Hello World\n')
})
it('calls the function when function given', function() {
var spy = jasmine.createSpy('dummy')
tspan = text.tspan('Hello World')
tspan.text(spy)
expect(spy).toHaveBeenCalledWith(tspan)
})
})
describe('dx()', function() {
it('gets the dx value with no argument', function() {
tspan.attr('dx', 25)
expect(tspan.dx()).toBe(25)
})
it('sets the dx value whith the first argument', function() {
expect(tspan.dx(25).attr('dx')).toBe(25)
})
})
})
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]-- |