aboutsummaryrefslogtreecommitdiff
path: root/tests/basic.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/basic.spec.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/basic.spec.ts b/tests/basic.spec.ts
index d964053..db2e9a3 100644
--- a/tests/basic.spec.ts
+++ b/tests/basic.spec.ts
@@ -1,4 +1,5 @@
-import { filter } from '../src'
+import { jlog } from '../src/utils'
+import { filter, matchAll } from '../src'
describe('Basic tests', () => {
it('should do it', () => {
@@ -9,4 +10,14 @@ describe('Basic tests', () => {
expect(filter(/\F\T/, [1, 0, '4', ''])).toEqual([])
expect(filter(/\s\T/, [1, 0, '4', ''])).toEqual(['4'])
})
+
+ fit('should do it', () => {
+ // jlog(matchAll(/[age \n]+/, [ {}, { age: 1 }, { age: 2 }, { age: 0 }, '' ]))
+ // jlog(matchAll(/[age \n]+/, [ {}, { age: 1 }, '' ]))
+ // jlog(matchAll(/([age \T][age \n])+/, [ {}, { age: 1 }, { age: 2 }, { age: 0 }, '' ]))
+
+ jlog(matchAll(/\n/, [ 'b', 1, 'a' ]))
+ // jlog(matchAll(/\n\T/, [1, 0, 2, '4', '']))
+ // jlog(matchAll(/\n+/, [ '', 1, 2, 0, '', 5, '' ]))
+ })
})