Skip to content

Commit 7aaba6b

Browse files
committed
fix travis tests
1 parent 186dbed commit 7aaba6b

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

.travis.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
language: node_js
22

3+
sudo: false
34
services:
45
- couchdb
56

67
node_js:
7-
- "0.10"
8+
- "stable"
89
script: npm run $COMMAND
910
before_script:
1011
- "export DISPLAY=:99.0"
1112
- "sh -e /etc/init.d/xvfb start"
12-
- "sleep 5"
13-
14-
# Workaround for Selenium #3280 issue
15-
- "sudo sed -i 's/^127\\.0\\.0\\.1.*$/127.0.0.1 localhost/' /etc/hosts"
16-
17-
# Lets know what CouchDB we are playing with
18-
# and make sure its logging debug
19-
- "curl -X GET http://127.0.0.1:5984/"
20-
- "curl -X PUT http://127.0.0.1:5984/_config/log/level -d '\"debug\"'"
21-
22-
after_failure:
23-
- "curl -X GET http://127.0.0.1:5984/_log?bytes=1000000"
13+
- "npm install add-cors-to-couchdb"
14+
- "./node_modules/.bin/add-cors-to-couchdb"
2415

2516
env:
2617
matrix:
2718
- COMMAND=test
2819
- CLIENT=selenium:firefox COMMAND=test
2920
- CLIENT=selenium:phantomjs COMMAND=test
3021
- COMMAND=coverage
22+
branches:
23+
only:
24+
- master

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
"phantomjs": "^1.9.7-5",
5555
"pouchdb": "5.2.1",
5656
"request": "^2.36.0",
57-
"sauce-connect-launcher": "^0.4.2",
58-
"selenium-standalone": "^3.0.2",
57+
"sauce-connect-launcher": "^0.11.1",
58+
"selenium-standalone": "^4.7.0",
5959
"uglify-js": "^2.4.13",
6060
"watchify": "~0.4.1",
6161
"wd": "^0.2.21"

test/test.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ function tests(dbName, dbType) {
4949

5050
var db;
5151

52-
beforeEach(function () {
53-
db = new Pouch(dbName);
54-
return db;
55-
});
56-
afterEach(function () {
57-
return db.destroy();
58-
});
5952
describe(dbType + ': search test suite', function () {
6053
this.timeout(30000);
54+
55+
beforeEach(function () {
56+
db = new Pouch(dbName);
57+
return db;
58+
});
59+
afterEach(function () {
60+
return db.destroy();
61+
});
6162

6263
it('basic search', function () {
6364
return db.bulkDocs({docs: docs}).then(function () {

0 commit comments

Comments
 (0)