kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
29 wiersze
511 B
TypeScript
29 wiersze
511 B
TypeScript
import test from 'ava'
|
|
|
|
import { NovuClient } from '@/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)
|
|
})
|