Skip to content

Commit 7b4dc9c

Browse files
committed
Add new test and increment version
1 parent b8daf5a commit 7b4dc9c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

general.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,17 @@ describe('Various Test Cases', () => {
8787

8888
const obj = { unknown: true, unknown2: 2 }
8989

90+
// test with deterministic function returning a passively preserved element.
9091
await testEngine(engine, {
9192
if: [true, obj, 5]
9293
}, {}, obj, 'equal')
94+
95+
// test with a non-deterministic function returning a passively preserved element.
96+
await testEngine(engine, {
97+
if: [{ var: 'data' }, obj, 5]
98+
}, {
99+
data: true
100+
}, obj, 'equal')
93101
}
94102
})
95103
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-logic-engine",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Construct complex rules with JSON & process them.",
55
"main": "./dist/cjs/index.js",
66
"module": "./dist/esm/index.js",

0 commit comments

Comments
 (0)