mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-08 13:10:29 +09:00
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user