Test if an array contains a specific number/string.

This commit is contained in:
ChenL
2017-03-16 10:05:50 +08:00
parent f1d68409b1
commit e4056a79ee
2 changed files with 9 additions and 1 deletions
+2
View File
@@ -45,6 +45,8 @@ describe('expression', function() {
expect(evalExp('x contains "X"', scope)).to.equal(true);
expect(evalExp('1 contains "x"', scope)).to.equal(false);
expect(evalExp('y contains "x"', scope)).to.equal(false);
expect(evalExp('(1..5) contains 3', scope)).to.equal(true);
expect(evalExp('(1..5) contains 6', scope)).to.equal(false);
expect(evalExp('"<=" == "<="', scope)).to.equal(true);
});