Skip to content

Commit f36465d

Browse files
Copilottypicode
andcommitted
test: add numeric-value tests for contains, startsWith, endsWith operators
Co-authored-by: typicode <5502029+typicode@users.noreply.github.com>
1 parent c9e2f5c commit f36465d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/matches-where.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,19 @@ await test('matchesWhere', async (t) => {
4040
[{ c: { contains: 'X' } }, true],
4141
[{ c: { contains: 'z' } }, false],
4242
[{ a: { contains: '1' } }, false],
43+
[{ c: { contains: 1 } }, false],
4344
// startsWith
4445
[{ c: { startsWith: 'x' } }, true],
4546
[{ c: { startsWith: 'X' } }, true],
4647
[{ c: { startsWith: 'z' } }, false],
4748
[{ a: { startsWith: '1' } }, false],
49+
[{ c: { startsWith: 1 } }, false],
4850
// endsWith
4951
[{ c: { endsWith: 'x' } }, true],
5052
[{ c: { endsWith: 'X' } }, true],
5153
[{ c: { endsWith: 'z' } }, false],
5254
[{ a: { endsWith: '1' } }, false],
55+
[{ c: { endsWith: 1 } }, false],
5356
]
5457

5558
for (const [query, expected] of cases) {

0 commit comments

Comments
 (0)