maplibre-gl
Version:
BSD licensed community fork of mapbox-gl, a WebGL interactive maps library
16 lines (14 loc) • 648 B
text/typescript
import {describe, test, expect} from 'vitest';
import {verticalizePunctuation} from './verticalize_punctuation.ts';
describe('verticalizePunctuation', () => {
test('preserves characters without fullwidth variants', () => {
expect(verticalizePunctuation('ABC123')).toBe('ABC123');
});
test('replaces punctuation marks with fullwidth variants', () => {
expect(verticalizePunctuation('!?')).toBe('︕︖');
});
test('replaces rotatable punctuation marks', () => {
expect(verticalizePunctuation('(…)')).toBe('︵︙︶');
expect(verticalizePunctuation('(⋯)')).toBe('︵︙︶');
});
});