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 :  C:/inetpub/wwwroot/parsmega.nuxt/node_modules/npm/node_modules/dezalgo/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/npm/node_modules/dezalgo/test/basic.js
var test = require('tap').test
var dz = require('../dezalgo.js')

test('the dark pony', function(t) {

  var n = 0
  function foo(i, cb) {
    cb = dz(cb)
    if (++n % 2) cb(true, i)
    else process.nextTick(cb.bind(null, false, i))
  }

  var called = 0
  var order = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]
  var o = 0
  for (var i = 0; i < 10; i++) {
    foo(i, function(cached, i) {
      t.equal(i, order[o++])
      t.equal(i % 2, cached ? 0 : 1)
      called++
    })
    t.equal(called, 0)
  }

  setTimeout(function() {
    t.equal(called, 10)
    t.end()
  })
})

Youez - 2016 - github.com/yon3zu
LinuXploit