blob: e0e6a6c9121b59c0afc28bc9663e9e170a55395a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
'use strict'
const { test } = require('tap')
const Dicer = require('../deps/dicer/lib/Dicer')
test('dicer-constructor', t => {
t.plan(2)
t.test('should throw an Error when no options parameter is supplied to Dicer', t => {
t.plan(1)
t.throws(() => new Dicer(), new Error('Boundary required'))
})
t.test('without new operator a new dicer instance will be initialized', t => {
t.plan(1)
t.type(Dicer({
boundary: '----boundary'
}), Dicer)
})
})
|