aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2022-01-24 19:42:04 +0530
committerAkshay Nair <phenax5@gmail.com>2022-01-24 19:42:04 +0530
commitf380df108a08bed22b92b9c5355d0b67168375be (patch)
treefff5bcfa58c00b9758b67a43ad6e7fefb7759d62 /tests
parentd11072880b45606cbc093132e3b0a11c16f8ef4b (diff)
downloadelxr-f380df108a08bed22b92b9c5355d0b67168375be.tar.gz
elxr-f380df108a08bed22b92b9c5355d0b67168375be.zip
test: adds another min-max test case
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.spec.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/basic.spec.ts b/tests/basic.spec.ts
index db074d4..86fdb7c 100644
--- a/tests/basic.spec.ts
+++ b/tests/basic.spec.ts
@@ -238,6 +238,22 @@ describe('Basic tests', () => {
'',
]).groups,
).toEqual([{ value: [{ age: 1 }, { age: 2 }, { age: 0 }, { age: 8 }], index: 1 }])
+
+ expect(
+ matchAll(/[age \n]{2, 4}/, [
+ {},
+ { age: 1 },
+ { age: 2 },
+ { age: 0 },
+ { age: 8 },
+ { age: 4 },
+ { age: 9 },
+ '',
+ ]).groups,
+ ).toEqual([
+ { value: [{ age: 1 }, { age: 2 }, { age: 0 }, { age: 8 }], index: 1 },
+ { value: [{ age: 4 }, { age: 9 }], index: 5 },
+ ])
})
})
})