summaryrefslogtreecommitdiffstats
path: root/fastify-busboy/test/dicer-export.test.js
blob: 05df4e68bfc372ab411e3c63c52002a7350accb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict'

const { test } = require('tap')
const { Dicer } = require('../lib/main')

test('dicer-export', t => {
  t.plan(2)

  t.test('without new operator a new dicer instance will be initialized', t => {
    t.plan(1)

    t.type(Dicer({
      boundary: '----boundary'
    }), Dicer)
  })

  t.test('with new operator a new dicer instance will be initialized', t => {
    t.plan(1)

    t.type(new Dicer({
      boundary: '----boundary'
    }), Dicer)
  })
})