����JFIF��� ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20
System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64
User : apache ( 48)
PHP Version : 7.4.20
Disable Function : NONE
Directory :  /var/www/html/lnovel/layout/default/node_modules/jquery-countdown/test/unit/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/lnovel/layout/default/node_modules/jquery-countdown/test/unit/event_test.js
module('Events');

test('trigger the update event', function() {
  var callback = sinon.spy();
  $dom.countdown('2020/10/20').on('update.countdown', callback);
  $clock.tick(500);
  ok(callback.callCount > 0);
});

test('trigger the finish event', function() {
  var now = new Date();
  var callback = sinon.spy();
  $dom.countdown(now).on('finish.countdown', callback);
  // Expect the callback to be called once (Issue #82)
  $clock.tick(2000);
  ok(callback.callCount === 1);
});

test('event object has {type, strftime, finalDate, offset, elapsed} ' +
     'properties', function() {
  $dom.countdown('2020/10/20').on('update.countdown', function(event) {
    ok(event.hasOwnProperty('type'));
    ok(event.hasOwnProperty('strftime'));
    ok(event.hasOwnProperty('finalDate'));
    ok(event.hasOwnProperty('offset'));
    ok(event.hasOwnProperty('elapsed'));
  });
  $clock.tick(500);
});

test('event.offset object has {seconds, minutes, hours, days, ' +
     'totalDays, weeks, years} properties', function() {
  $dom.countdown('2020/10/20').on('update.countdown', function(event) {
    ok(event.offset.hasOwnProperty('seconds'));
    ok(event.offset.hasOwnProperty('minutes'));
    ok(event.offset.hasOwnProperty('hours'));
    ok(event.offset.hasOwnProperty('days'));
    ok(event.offset.hasOwnProperty('daysToWeek'));
    ok(event.offset.hasOwnProperty('daysToMonth'));
    ok(event.offset.hasOwnProperty('weeks'));
    ok(event.offset.hasOwnProperty('weeksToMonth'));
    ok(event.offset.hasOwnProperty('years'));
    ok(event.offset.hasOwnProperty('totalDays'));
    ok(event.offset.hasOwnProperty('totalHours'));
    ok(event.offset.hasOwnProperty('totalMinutes'));
    ok(event.offset.hasOwnProperty('totalSeconds'));
  });
  $clock.tick(500);
});

test('allow the callback be setted uppon initialization (legacy ' +
     'style)', function() {
  $dom.countdown('2020/10/20', function(event) {
    ok(true); // Up to this point the event was dispatched
  });
  $clock.tick(500);
});

test('event leaking and collision', function() {
  var event;
  var future = new Date().getTime() + 5000;
  var clickHandler = sinon.spy();
  var updateHandler = sinon.spy();

  $dom.countdown(future)
    .on('click', clickHandler)
    .on('update.countdown', updateHandler);
  $clock.tick(500);

  ok(!clickHandler.called);
  ok(updateHandler.called);

  event = updateHandler.lastCall.args[0];
  ok(event.namespace === 'countdown');

  $dom.trigger('click');
  updateHandler.reset();

  ok(clickHandler.called);
  ok(!updateHandler.called);

  // Trigger event without the namespace
  $dom.trigger('update');
  ok(updateHandler.called);

  event = updateHandler.lastCall.args[0];
  ok(event.namespace === '');
});

ZeroDay Forums Mini