Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../uploads/../../../../instantly.picotech.app/homes/../../wa.picotech.app/public_html/node_modules/escape-html/.././object-assign/../@hapi/../inherits/../punycode/../lodash.clonedeep/../dotenv/../yargs/../pino/./test/transport
الملفات الموجودة في هذا الـ Path:
.
..
big.test.js
bundlers-support.test.js
caller.test.js
core.test.js
core.test.ts
core.transpiled.test.ts
module-link.test.js
pipeline.test.js
syncfalse.test.js
targets.test.js

مشاهدة ملف: targets.test.js

'use strict'

const { test } = require('tap')
const proxyquire = require('proxyquire')
const Writable = require('stream').Writable

test('file-target mocked', async function ({ equal, same, plan, pass }) {
  plan(1)
  let ret
  const fileTarget = proxyquire('../../file', {
    './pino': {
      destination (opts) {
        same(opts, { dest: 1, sync: false })

        ret = new Writable()
        ret.fd = opts.dest

        process.nextTick(() => {
          ret.emit('ready')
        })

        return ret
      }
    }
  })

  await fileTarget()
})