Debian Codegraph @

fastify-busboy/test/busboy-emit.test.js

raw symbols SCIP
1 'use strict'
2
3 const Busboy = require('../lib/main')
4 const { test } = require('node:test')
5
6 test('busboy, emit', t => {
7 t.plan(1)
8
9 t.test('returns undefined when the event is called a second time and the busboy was already finished', t => {
10 const busboy = new Busboy({ headers: { 'content-type': 'application/x-www-form-urlencoded' } })
11 busboy._finished = true
12 busboy.emit('finish')
13
14 t.assert.strictEqual(busboy.emit('finish'), undefined)
15 })
16 })