21 lines
636 B
YAML
Raw Normal View History

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])