mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 10:15:59 +08:00
wip: code review
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
describe('Test Public', () => {
|
||||
it('test query', () => {
|
||||
import { replaceStr2Arr } from '../src/util';
|
||||
|
||||
describe('Test', () => {
|
||||
it('test doQueryIssues', () => {
|
||||
const issues = [
|
||||
{
|
||||
id: 0,
|
||||
@@ -42,4 +44,12 @@ describe('Test Public', () => {
|
||||
expect(r[2].id).toEqual(5);
|
||||
expect(r.length).toEqual(3);
|
||||
});
|
||||
|
||||
it('test replaceStr2Arr', () => {
|
||||
const st = '/assign @1 @2 @3@a 3 @s @1_2 2';
|
||||
const re = '/assign';
|
||||
const sp = '@';
|
||||
|
||||
expect(replaceStr2Arr(st, re, sp)).toEqual(['1', '2', '3', 'a 3', 's', '1_2 2']);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user