403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.216.41
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/crm_easylife/libraries/jquery/defunkt-jquery-pjax/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/crm_easylife/libraries/jquery/defunkt-jquery-pjax/test/run-qunit.coffee
fs = require 'fs'
print = (s) -> fs.write "/dev/stderr", s, 'w'

page = new WebPage()
page.onConsoleMessage = (msg) -> console.error msg

timeoutId = null
deferTimeout = ->
  clearTimeout timeoutId if timeoutId
  timeoutId = setTimeout ->
    console.error "Timeout"
    phantom.exit 1
  , 3000

page.open phantom.args[0], ->
  deferTimeout()

  setInterval ->
    tests = page.evaluate ->
      tests = document.getElementById('qunit-tests').children
      for test in tests when test.className isnt 'running' and not test.recorded
        test.recorded = true
        if test.className is 'pass'
          '.'
        else if test.className is 'fail'
          'F'

    for test in tests when test
      deferTimeout()
      print test

    result = page.evaluate ->
      result = document.getElementById('qunit-testresult')
      tests  = document.getElementById('qunit-tests').children

      if result.innerText.match /completed/
        console.error ""

        for test in tests when test.className is 'fail'
          console.error test.innerText

        console.error result.innerText
        return parseInt result.getElementsByClassName('failed')[0].innerText

      return

    phantom.exit result if result?
  , 100

Youez - 2016 - github.com/yon3zu
LinuXploit