mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-14 23:11:58 +00:00
21 lines
636 B
YAML
21 lines
636 B
YAML
|
desc: Regression tests for issue #354, Skip and limit should throw and error
|
||
|
tests:
|
||
|
|
||
|
- def: arr = r.expr([1,2,3,4,5])
|
||
|
|
||
|
# Correct behavior
|
||
|
- cd: arr.skip(2)
|
||
|
ot: [3,4,5]
|
||
|
|
||
|
- cd: arr.skip('a')
|
||
|
ot: err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.", [1])
|
||
|
|
||
|
- cd: arr.skip([1,2,3])
|
||
|
ot: err("ReqlQueryLogicError", "Expected type NUMBER but found ARRAY.", [1])
|
||
|
|
||
|
- cd: arr.skip({}).count()
|
||
|
ot: err("ReqlQueryLogicError", "Expected type NUMBER but found OBJECT.", [0, 1])
|
||
|
|
||
|
- cd: arr.skip(null)
|
||
|
ot: err("ReqlNonExistenceError", "Expected type NUMBER but found NULL.", [1])
|