mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-28 17:11:05 +00:00
14 lines
343 B
TypeScript
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);
|
|
});
|