@@ -5,6 +5,8 @@ import Cursor from '../src/cursor'
55
66const range = ( n ) => Array . from ( Array ( n ) . keys ( ) )
77const alpha = ( i ) => String . fromCharCode ( 'a' . charCodeAt ( 0 ) + i )
8+ const ARANGO_VERSION = Number ( process . env . ARANGO_VERSION || 30000 )
9+ const describe_2x = ARANGO_VERSION < 30000 ? describe : describe . skip
810
911describe ( 'Simple queries' , ( ) => {
1012 let name = `testdb_${ Date . now ( ) } `
@@ -13,7 +15,7 @@ describe('Simple queries', () => {
1315 before ( ( done ) => {
1416 db = new Database ( {
1517 url : 'http://root:@localhost:8529' ,
16- arangoVersion : Number ( process . env . ARANGO_VERSION || 30000 )
18+ arangoVersion : ARANGO_VERSION
1719 } )
1820 db . createDatabase ( name )
1921 . then ( ( ) => {
@@ -81,7 +83,7 @@ describe('Simple queries', () => {
8183 . catch ( done )
8284 } )
8385 } )
84- describe ( 'collection.first' , ( ) => {
86+ describe_2x ( 'collection.first' , ( ) => {
8587 it ( 'returns the first document in the collection' , ( done ) => {
8688 collection . first ( )
8789 . then ( ( doc ) => {
@@ -95,7 +97,7 @@ describe('Simple queries', () => {
9597 . catch ( done )
9698 } )
9799 } )
98- describe ( 'collection.last' , ( ) => {
100+ describe_2x ( 'collection.last' , ( ) => {
99101 it ( 'returns the last document in the collection' , ( done ) => {
100102 collection . last ( )
101103 . then ( ( doc ) => {
0 commit comments