* feat: GitHub Hacktoberfest 2020 (and beyond) * chore: prettify * refactor: convert to static fields * refactor: fix spelling in pre-start message Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
30 lines
661 B
JavaScript
30 lines
661 B
JavaScript
'use strict'
|
|
|
|
const { test, given } = require('sazerac')
|
|
const GitHubHacktoberfest = require('./github-hacktoberfest.service')
|
|
|
|
describe('GitHubHacktoberfest', function () {
|
|
test(GitHubHacktoberfest.render, () => {
|
|
given({
|
|
daysLeft: -1,
|
|
contributionCount: 12,
|
|
}).expect({
|
|
message: 'is over! (12 PRs opened)',
|
|
})
|
|
given({
|
|
daysLeft: 10,
|
|
contributionCount: 27,
|
|
suggestedIssueCount: 54,
|
|
}).expect({
|
|
message: '54 open issues, 27 PRs, 10 days left',
|
|
})
|
|
given({
|
|
daysToStart: 5,
|
|
hasStarted: false,
|
|
year: 2020,
|
|
}).expect({
|
|
message: '5 days till kickoff!',
|
|
})
|
|
})
|
|
})
|