mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-08 15:15:02 -04:00
feat(new tool): numeronym generator (#729)
This commit is contained in:
parent
fe1de8c5c9
commit
e07e2ae5bc
8 changed files with 87 additions and 1 deletions
|
@ -0,0 +1,15 @@
|
|||
import { describe, expect, it } from 'vitest';
|
||||
import { generateNumeronym } from './numeronym-generator.service';
|
||||
|
||||
describe('numeronym-generator service', () => {
|
||||
describe('generateNumeronym', () => {
|
||||
it('a numeronym of a word is the first letter, the number of letters between the first and the last letter, and the last letter', () => {
|
||||
expect(generateNumeronym('internationalization')).toBe('i18n');
|
||||
expect(generateNumeronym('accessibility')).toBe('a11y');
|
||||
expect(generateNumeronym('localization')).toBe('l10n');
|
||||
});
|
||||
it('a numeronym of a word with 3 letters is the word itself', () => {
|
||||
expect(generateNumeronym('abc')).toBe('abc');
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue