Skip to content

Commit

Permalink
test canada post spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Mar 7, 2024
1 parent dadb0e6 commit 33f937e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export declare const preferredSaultSteMarieSpelling = "Sault Ste. Marie";
export declare const canadaPostSaultSteMarieSpelling = "S-STE-MARIE";
/**
* Determines whether a word is a spelling of Sault Ste. Marie.
* @param {string} possibleSpelling - A possible spelling of Sault Ste. Marie.
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie';
export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE';
const lowerCaseSaultSteMarieSpellings = new Set([
's s marie',
's ste marie',
Expand Down
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export const preferredSaultSteMarieSpelling = 'Sault Ste. Marie'

export const canadaPostSaultSteMarieSpelling = 'S-STE-MARIE'

const lowerCaseSaultSteMarieSpellings = new Set([
's s marie',
's ste marie',
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('isSaultSteMarie()', () => {
});
describe('fixSaultSteMarie()', () => {
it('Uses the preferred spelling of Sault Ste. Marie', () => {
assert.strictEqual(isSaultSteMarie.fixSaultSteMarie('sault ste marie'), isSaultSteMarie.preferredSaultSteMarieSpelling);
assert.strictEqual(isSaultSteMarie.fixSaultSteMarie(isSaultSteMarie.canadaPostSaultSteMarieSpelling), isSaultSteMarie.preferredSaultSteMarieSpelling);
});
it('Uses a given spelling of Sault Ste. Marie', () => {
const givenSpelling = 'the soo';
Expand Down
4 changes: 3 additions & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ describe('isSaultSteMarie()', () => {
describe('fixSaultSteMarie()', () => {
it('Uses the preferred spelling of Sault Ste. Marie', () => {
assert.strictEqual(
isSaultSteMarie.fixSaultSteMarie('sault ste marie'),
isSaultSteMarie.fixSaultSteMarie(
isSaultSteMarie.canadaPostSaultSteMarieSpelling
),
isSaultSteMarie.preferredSaultSteMarieSpelling
)
})
Expand Down

0 comments on commit 33f937e

Please sign in to comment.