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/path-exists/../duplexify/./.././debug/../domutils/../cheerio/../negotiator/../socket.io/../express/../@whiskeysockets/../ws/../cheerio-select/../methods/../process-warning
الملفات الموجودة في هذا الـ Path:
.
..
.github
LICENSE
README.md
index.d.ts
index.js
index.test-d.ts
jest.test.js
package.json
test.js
مشاهدة ملف: jest.test.js
/* 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()
})
})