Skip to content

Commit a9d8861

Browse files
committed
Fix failing tests
1 parent 89f3fe8 commit a9d8861

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

test/01-manipulating-databases.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ const range = (n) => Array.from(Array(n).keys())
88
describe('Manipulating databases', () => {
99
let db
1010
beforeEach(() => {
11-
db = new Database()
11+
db = new Database({
12+
url: 'http://root:@localhost:8529',
13+
arangoVersion: Number(process.env.ARANGO_VERSION || 30000)
14+
})
1215
})
1316
describe('database.useDatabase', () => {
1417
it('updates the database name', () => {

test/12-simple-queries.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import Cursor from '../src/cursor'
55

66
const range = (n) => Array.from(Array(n).keys())
77
const 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

911
describe('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

Comments
 (0)