403Webshell
Server IP : 14.225.204.176  /  Your IP : 216.73.216.169
Web Server : nginx/1.24.0
System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64
User : root ( 0)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/php/zinisoft.net-react/node_modules/aos/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/php/zinisoft.net-react/node_modules/aos/test/elements.spec.js
import $ from 'jquery';
import elements from '../src/js/helpers/elements';

jasmine.getStyleFixtures().fixturesPath = 'base/dist';
jasmine.getFixtures().fixturesPath = 'base/test/fixtures';

describe('Elements helper (elements.js) -> ', function() {

  beforeEach(function() {
    jasmine.getStyleFixtures().load = 'aos.css';
    jasmine.getFixtures().load('aos.fixture.html');
  });

  afterEach(function() {
    jasmine.getStyleFixtures().cleanUp();
    jasmine.getFixtures().cleanUp();
  });

  it('Should return array with objects that coresponds to elements in aos.fixture.html', function() {
    var aosElements = elements();
    expect(aosElements.length).toBe($('[data-aos]').length);
  });

  it('Should return array of objects', function() {
    var aosElements = elements();

    for (var i = 0; i < aosElements.length; i++) {
      if (aosElements[i].node) {
        expect(typeof aosElements[i]).toEqual('object');
      }
    }
  });

  it('Each object in returned array should have "node" attribute', function() {
    var aosElements = elements();

    for (var i = 0; i < aosElements.length; i++) {
      expect(aosElements[i].hasOwnProperty('node')).toBe(true);
    }
  });

  it('Each objects node in returned array should be a DOMNode', function() {
    var aosElements = elements();

    function isNode(obj) {
      return (typeof obj === "object") && (obj.nodeType === 1) && (typeof obj.style === "object") && (typeof obj.ownerDocument === "object");
    }

    for (var i = 0; i < aosElements.length; i++) {
      if (aosElements[i].node) {
        expect(isNode(aosElements[i].node)).toBe(true);
      }
    }
  });

});

Youez - 2016 - github.com/yon3zu
LinuXploit