generated from senecajs/SenecaConfig
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBatchProcessor.test.ts
40 lines (32 loc) · 1004 Bytes
/
BatchProcessor.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* Copyright © 2024 Seneca Project Contributors, MIT License. */
import Seneca from 'seneca'
// import SenecaMsgTest from 'seneca-msg-test'
// import { Maintain } from '@seneca/maintain'
import BatchProcessorDoc from '../src/BatchProcessorDoc'
import BatchProcessor from '../src/BatchProcessor'
describe('BatchProcessor', () => {
test('load-plugin', async () => {
expect(BatchProcessorDoc).toBeDefined()
const seneca = Seneca({ legacy: false })
.test()
.use('promisify')
.use('entity')
.use(BatchProcessor)
await seneca.ready()
expect(seneca.export('BatchProcessor/process')).toBeDefined()
await seneca.close()
})
test('basic', async () => {
const seneca = makeSeneca()
await seneca.ready()
await seneca.close()
})
})
function makeSeneca(opts: any = {}) {
const seneca = Seneca({ legacy: false })
.test()
.use('entity')
.use('entity-util', { when: { active: true } })
.use(BatchProcessor, opts)
return seneca
}