Buckets:
| const test = require('node:test') | |
| const assert = require('node:assert') | |
| const { join } = require('node:path') | |
| const { pathToFileURL } = require('node:url') | |
| const { readFile } = require('node:fs').promises | |
| const execa = require('execa') | |
| const { file, watchFileCreated } = require('../helper') | |
| test('pino.transport works when loaded via --import=preload', async () => { | |
| const destination = file() | |
| const preload = pathToFileURL(join(__dirname, '..', 'fixtures', 'transport-preload.mjs')).href | |
| const main = join(__dirname, '..', 'fixtures', 'transport-preload-main.mjs') | |
| await execa(process.argv[0], [ | |
| `--import=${preload}`, | |
| main, | |
| destination | |
| ], { timeout: 10000 }) | |
| await watchFileCreated(destination) | |
| const result = JSON.parse(await readFile(destination)) | |
| assert.equal(result.msg, 'hello from main') | |
| }) | |
| test('pino.transport works when loaded via --import preload (space separated)', async () => { | |
| const destination = file() | |
| const preload = pathToFileURL(join(__dirname, '..', 'fixtures', 'transport-preload.mjs')).href | |
| const main = join(__dirname, '..', 'fixtures', 'transport-preload-main.mjs') | |
| await execa(process.argv[0], [ | |
| '--import', | |
| preload, | |
| main, | |
| destination | |
| ], { timeout: 10000 }) | |
| await watchFileCreated(destination) | |
| const result = JSON.parse(await readFile(destination)) | |
| assert.equal(result.msg, 'hello from main') | |
| }) | |
Xet Storage Details
- Size:
- 1.41 kB
- Xet hash:
- 2ad678f09d9bb71dee0a9db59fbbf790e48be780edc4403b2b193cf5f9c3fd4f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.