update Tests
This commit is contained in:
19
test/test.ts
19
test/test.ts
@ -13,8 +13,23 @@ tap.test('should create a valid slackme instance', async () => {
|
||||
|
||||
tap.test('should send a message to Slack', async () => {
|
||||
let slackMessage = new slackme.SlackMessage({
|
||||
text: 'hi. This is a text',
|
||||
color: '#3cb371'
|
||||
author_name: 'GitLab CI',
|
||||
author_link: 'https://gitlab.com/',
|
||||
pretext: '*Good News*: Build successfull!',
|
||||
color: '#3cb371',
|
||||
fields: [
|
||||
{
|
||||
title: 'Branch',
|
||||
value: 'Lossless Cloud',
|
||||
short: true
|
||||
},
|
||||
{
|
||||
title: 'Product ID',
|
||||
value: 'pushrocks',
|
||||
short: true
|
||||
}
|
||||
],
|
||||
ts: (new Date()).getTime()
|
||||
})
|
||||
testSlackme.sendMessage(slackMessage, 'random')
|
||||
})
|
||||
|
Reference in New Issue
Block a user