403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/parsmega.nuxt/node_modules/@splidejs/splide/src/js/utils/dom/query/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/parsmega.nuxt/node_modules/@splidejs/splide/src/js/utils/dom/query/query.test.ts
import { query } from './query';


describe( 'query', () => {
  beforeEach( () => {
    document.body.innerHTML = `
      <div id="div1">
        <span>1</span>
      </div>
      <div id="div2">
        <span>2</span>
      </div>
      <div id="div3">
        <span>3</span>
      </div>
    `;
  } );

  test( 'can return the first element that matches the specified selector.', () => {
    const div1 = query( document, 'div' );
    expect( div1.id ).toBe( 'div1' );

    const div3 = query( document, '#div3' );
    expect( div3.id ).toBe( 'div3' );
  } );

  test( 'can accept a parent element to start find an element from.', () => {
    const div2  = query( document, '#div2' );
    const span2 = query( div2, 'span' );

    expect( span2.textContent ).toBe( '2' );
  } );

  test( 'should return `null` if nothing matches the selector.', () => {
    expect( query( document, '#nothing' ) ).toBeNull();
  } );
} );

Youez - 2016 - github.com/yon3zu
LinuXploit