download
raw
692 Bytes
'use strict'
const { test } = require('node:test')
const { createWarning } = require('../')
const { withResolvers } = require('./promise')
test('emit should set the emitted state', t => {
t.plan(3)
const { promise, resolve } = withResolvers()
process.on('warning', onWarning)
function onWarning () {
t.fail('should not be called')
}
const warn = createWarning({
name: 'TestDeprecation',
code: 'CODE',
message: 'Hello world'
})
t.assert.ok(!warn.emitted)
warn.emitted = true
t.assert.ok(warn.emitted)
warn()
t.assert.ok(warn.emitted)
setImmediate(() => {
process.removeListener('warning', onWarning)
resolve()
})
return promise
})

Xet Storage Details

Size:
692 Bytes
·
Xet hash:
6c3174a19c49897c113f03769d63c687e4d07c5f7f5d724037a569bafd9c7515

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.