-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always allow overriding the label (#1108)
Audit all the badges with test coverage, looking for badges which assign `badgeData.text[0]`.
- Loading branch information
1 parent
0068f31
commit 820b72c
Showing
4 changed files
with
73 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
|
||
const assert = require('assert'); | ||
const { | ||
maybePluralize | ||
} = require('./text-formatters'); | ||
|
||
describe('text formatters', function() { | ||
it('should pluralize', function() { | ||
assert.equal(maybePluralize('foo', []), 'foos'); | ||
assert.equal(maybePluralize('foo', [123]), 'foo'); | ||
assert.equal(maybePluralize('foo', [123, 456]), 'foos'); | ||
assert.equal(maybePluralize('foo', undefined), 'foos'); | ||
|
||
assert.equal(maybePluralize('box', [], 'boxes'), 'boxes'); | ||
assert.equal(maybePluralize('box', [123], 'boxes'), 'box'); | ||
assert.equal(maybePluralize('box', [123, 456], 'boxes'), 'boxes'); | ||
assert.equal(maybePluralize('box', undefined, 'boxes'), 'boxes'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters