Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
build: added multiple test cases to cover picking and ffoo
Browse files Browse the repository at this point in the history
  • Loading branch information
juhandergod committed Oct 30, 2023
1 parent b706e89 commit 75e21c3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/utils/__tests__/typoFixer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,28 @@ describe('TypoFixer module tests', () => {
// then
expect(output).toBe(expectedOutput);
});

test('Should replace FFoo by Foo', async () => {
// given
const expectedOutput = 'Foo';
const inputWord = 'Ffoo';

// when
const output = await sentenceTypoFixer(inputWord);

// then
expect(output).toBe(expectedOutput);
});

test('Should not replace picking', async () => {
// given
const expectedOutput = 'picking';
const inputWord = 'picking';

// when
const output = await sentenceTypoFixer(inputWord);

// then
expect(output).toBe(expectedOutput);
});
});

0 comments on commit 75e21c3

Please sign in to comment.