Files
klz-cables.com/.pnpm-store/v10/files/2e/f3c06ae9857ec1644135c3c12226820c74754729c3f7b44fff97b127c5b9cb7f7ff414db60245590982ca0c1f35a89d86329fa52523747b7a52d398b48d473
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

36 lines
692 B
Plaintext

'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
})