)
})
- it('Verify that taskFunctions parameter is an object literal', () => {
+ it('Verify that taskFunctions parameter is not an empty object literal', () => {
expect(() => new ClusterWorker([])).toThrowError(
new TypeError('taskFunctions parameter is not an object literal')
)
expect(() => new ClusterWorker(new WeakSet())).toThrowError(
new TypeError('taskFunctions parameter is not an object literal')
)
+ expect(() => new ClusterWorker({})).toThrowError(
+ new TypeError('taskFunctions parameter object is empty')
+ )
})
it('Verify that taskFunctions parameter with multiple task functions is taken', () => {