0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-06-28 21:06:14 +02:00
gitea/web_src/js/utils/string.test.ts
2026-06-27 12:09:01 +00:00

14 lines
343 B
TypeScript

import {cutString} from './string.ts';
test('cutString', () => {
let [before, after, ok] = cutString('a = b = c', '=');
expect(before).toBe('a ');
expect(after).toBe(' b = c');
expect(ok).toBe(true);
[before, after, ok] = cutString(' a ', '=');
expect(before).toBe(' a ');
expect(after).toBe('');
expect(ok).toBe(false);
});