Skip to content

Commit

Permalink
test: Ignore test case for is defined() function
Browse files Browse the repository at this point in the history
The built-in function `is defined()` doesn't work anymore. By returning `null` for a non-existing variable, the function returns always `true`. Previously, the function was used to check if a variable or context entry exists.

See the issue for details: #695.
  • Loading branch information
saig0 committed Sep 7, 2023
1 parent d63ed54 commit 3de276b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ class BuiltinFunctionsTest
eval(""" is defined( {"a":1}.a ) """) should be(ValBoolean(true))
}

it should "return false if a variable doesn't exist" in {
// see: https://github.com/camunda/feel-scala/issues/695
ignore should "return false if a variable doesn't exist" in {
eval("is defined(a)") should be(ValBoolean(false))
eval("is defined(a.b)") should be(ValBoolean(false))
}

// see: https://github.com/camunda/feel-scala/issues/695
ignore should "return false if a context entry doesn't exist" in {
eval("is defined({}.a)") should be(ValBoolean(false))
eval("is defined({}.a.b)") should be(ValBoolean(false))
Expand Down

0 comments on commit 3de276b

Please sign in to comment.