Skip to content

Commit 00e4877

Browse files
committed
minor fix also 1 failing test fix
1 parent 838bc8d commit 00e4877

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import publishMastodon from './lib/publishMastodon.ts'
1313
import publishReddit from './lib/publishReddit.ts'
1414
import { PostParameters } from './lib/types/types.ts'
1515

16-
const distributeCoupons = (): void => {
17-
const { expiryDate, discountCodes } = currentCoupons()
16+
const distributeCoupons = async(): Promise<void> => {
17+
const { expiryDate, discountCodes } = await currentCoupons()
1818
const discount = randomDiscount()
1919
const coupon = discountCodes[discount + '%']
2020

test/mastodonPost.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test('Mastodon post should always include #coupon hashtag', () => {
2222

2323
test('Mastodon post should always mention discount amount', () => {
2424
for (let i = 10; i < 40; i++) {
25-
assert.ok(mastodonPost(defaultParams).includes(i + '%'))
25+
assert.ok(mastodonPost({ discount: i, coupon: ':COUPON:', expiryDate: ':EXPIRATION:' }).includes(i + '%'))
2626
}
2727
})
2828

0 commit comments

Comments
 (0)