Skip to content

Commit

Permalink
some tests for customizing new key
Browse files Browse the repository at this point in the history
  • Loading branch information
nexdrew committed Oct 28, 2024
1 parent 10734e2 commit ff9c8d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ const strings = {
singular: 'Profit',
plural: 'Profit'
},
[Strings.OTHER_COMP]: 'Restricted Stock Unit',
[Strings.PLAN]: 'Program',
[Strings.QUOTA]: {
one: 'Plan',
Expand Down Expand Up @@ -826,6 +827,7 @@ tap.test('instance get', t => {
t.strictEqual(s.get(Strings.ANNUAL_CONTRACT_VALUE, { abbrev: true }), 'ACV')
t.strictEqual(d.get(Strings.TRANSACTION_DATE, { abbrev: true }), 'TD')
t.strictEqual(d.get(Strings.OTHER_COMP, { abbrev: true }), 'OC')
t.strictEqual(s.get(Strings.OTHER_COMP, { abbrev: true }), 'RSU')

// 2rd arg object as opts with plural boolean and flu boolean
t.strictEqual(d.get(Strings.REPORT, { plural: false, flu: true }), 'Report')
Expand Down Expand Up @@ -869,6 +871,7 @@ tap.test('instance getSingular', t => {
t.strictEqual(s.getSingular(Strings.QUOTA), 'Plan')
t.strictEqual(d.getSingular(Strings.ANNUAL_CONTRACT_VALUE), 'Annual Contract Value')
t.strictEqual(s.getSingular(Strings.ANNUAL_CONTRACT_VALUE), 'Annual Contract Value')
t.strictEqual(s.getSingular(Strings.OTHER_COMP), 'Restricted Stock Unit')
t.strictEqual(d.getSingular(invalidKey), '')
t.strictEqual(s.getSingular(invalidKey), '')

Expand Down Expand Up @@ -902,6 +905,7 @@ tap.test('instance getPlural', t => {
t.strictEqual(s.getPlural(Strings.QUOTA), 'Plans')
t.strictEqual(d.getPlural(Strings.ANNUAL_CONTRACT_VALUE), 'Annual Contract Value')
t.strictEqual(s.getPlural(Strings.ANNUAL_CONTRACT_VALUE), 'Annual Contract Value')
t.strictEqual(s.getPlural(Strings.OTHER_COMP), 'Restricted Stock Units')
t.strictEqual(d.getPlural(invalidKey), '')
t.strictEqual(s.getPlural(invalidKey), '')

Expand Down

0 comments on commit ff9c8d2

Please sign in to comment.