mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
wip: code formatting nits continued
This commit is contained in:
25
test/deburr.spec.js
Normal file
25
test/deburr.spec.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import lodashStable from 'lodash';
|
||||
import { burredLetters, deburredLetters, comboMarks } from './utils';
|
||||
import deburr from '../src/deburr';
|
||||
|
||||
describe('deburr', () => {
|
||||
it('should convert Latin Unicode letters to basic Latin', () => {
|
||||
const actual = lodashStable.map(burredLetters, deburr);
|
||||
expect(actual).toEqual(deburredLetters);
|
||||
});
|
||||
|
||||
it('should not deburr Latin mathematical operators', () => {
|
||||
const operators = ['\xd7', '\xf7'];
|
||||
const actual = lodashStable.map(operators, deburr);
|
||||
|
||||
expect(actual).toEqual(operators);
|
||||
});
|
||||
|
||||
it('should deburr combining diacritical marks', () => {
|
||||
const expected = lodashStable.map(comboMarks, lodashStable.constant('ei'));
|
||||
|
||||
const actual = lodashStable.map(comboMarks, (chr) => deburr(`e${chr}i`));
|
||||
|
||||
expect(actual).toEqual(expected);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user