wip: code review

This commit is contained in:
元凛
2022-02-09 10:08:44 +08:00
parent f79ccb5f94
commit 8cd9c11d81
19 changed files with 7849 additions and 3136 deletions

View File

@@ -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']);
});
});