We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 039e35e commit 0ed32eaCopy full SHA for 0ed32ea
test/authors.test.js
@@ -0,0 +1,28 @@
1
+const getConfig = require('../src/libs/getConfig')
2
+const config = getConfig()
3
+const { authors } = config
4
+const reg = new RegExp(authors.join('|'), 'im')
5
+
6
+describe('Test Author Regexp', () => {
7
+ test('chengpeiquan', () => {
8
+ expect(reg.test('chengpeiquan')).toBeTruthy()
9
+ })
10
+})
11
12
13
+ test('ChengPeiQuan', () => {
14
+ expect(reg.test('ChengPeiQuan')).toBeTruthy()
15
16
17
18
19
+ test('peiquan', () => {
20
+ expect(reg.test('peiquan')).toBeFalsy()
21
22
23
24
25
+ test('petter', () => {
26
+ expect(reg.test('petter')).toBeFalsy()
27
28
0 commit comments