Files
ArchiveCostWebapp/logic/node-red-data/node_modules/process-warning/test/jest.test.js
T
huesser b518ae8edb
Build and Publish Site / docker (push) Successful in 23s
Workflow funktioniert nun wieder. Es gab Probleme nach Aenderungen.
ABER: Die Applikation funktioniert nur lokal. Die deployte Version geht noch nicht.
2026-07-03 13:24:08 +02:00

21 lines
517 B
JavaScript

/* global test, expect */
'use strict'
const build = require('..')
test('works with jest', done => {
const { create, emit, emitted } = build()
create('FastifyDeprecation', 'CODE', 'Hello %s')
emit('CODE', 'world')
// we cannot actually listen to process warning event
// because jest messes with it (that's the point of this test)
// we can only test it was emitted indirectly
// and test no exception is raised
setImmediate(() => {
expect(emitted.get('CODE')).toBeTruthy()
done()
})
})