Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.composer
1 change: 1 addition & 0 deletions src/Evaluator/NodeEvaluator/LogicNodeEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class LogicNodeEvaluator implements NodeEvaluator {
if (item === '') {
return null
}
item = item.toLowerCase()
}
return item
}
Expand Down
6 changes: 6 additions & 0 deletions tests/Evaluator/EvaluatorIntegration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,3 +593,9 @@ it('should evaluate if with empty string value', () => {

expect(evaluator.evaluate(expr, {})).toEqual('')
})

it('should evaluate unwrapped methods', () => {
const expr = "@IF(false, 'foobar', 'foo')"

expect(evaluator.evaluate(expr, {})).toEqual('foo')
})
4 changes: 4 additions & 0 deletions tests/Evaluator/NodeEvaluator/LogicNodeEvaluator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const logicProvider: Array<[Node, boolean]> = [
makeNode(2, 2, '<>'),
false
],
[
makeNode('foo', 'FOO', '='),
true
]

]

Expand Down
Loading