ternary validation
This commit is contained in:
parent
8fb75d57fc
commit
6966c8d3e5
|
@ -10,5 +10,5 @@ describe("Evaluate ternary operator", () => {
|
||||||
testEvalToBe("false ? 'YES' : 'NO'", "Ok('NO')")
|
testEvalToBe("false ? 'YES' : 'NO'", "Ok('NO')")
|
||||||
testEvalToBe("2 > 1 ? 'YES' : 'NO'", "Ok('YES')")
|
testEvalToBe("2 > 1 ? 'YES' : 'NO'", "Ok('YES')")
|
||||||
testEvalToBe("2 <= 1 ? 'YES' : 'NO'", "Ok('NO')")
|
testEvalToBe("2 <= 1 ? 'YES' : 'NO'", "Ok('NO')")
|
||||||
testEvalToBe("1+1 ? 'YES' : 'NO'", "Error(Expected type: Boolean)")
|
testEvalToBe("1+1 ? 'YES' : 'NO'", "Error(Expected type: Boolean but got: )")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user