kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
28 wiersze
515 B
TypeScript
28 wiersze
515 B
TypeScript
![]() |
import test from 'ava'
|
||
|
|
||
|
import { NovuClient } from '../src/services/novu'
|
||
|
import './_utils'
|
||
|
|
||
|
test('NovuClient.triggerEvent', async (t) => {
|
||
|
if (!process.env.NOVU_API_KEY) {
|
||
|
return t.pass()
|
||
|
}
|
||
|
|
||
|
t.timeout(2 * 60 * 1000)
|
||
|
const client = new NovuClient()
|
||
|
|
||
|
const result = await client.triggerEvent({
|
||
|
name: 'send-email',
|
||
|
payload: {
|
||
|
content: 'Hello World!'
|
||
|
},
|
||
|
to: [
|
||
|
{
|
||
|
subscriberId: '123456',
|
||
|
email: 'pburckhardt@outlook.com'
|
||
|
}
|
||
|
]
|
||
|
})
|
||
|
t.truthy(result)
|
||
|
})
|