Skip to content

Commit fbaf062

Browse files
committed
initial
0 parents  commit fbaf062

File tree

15 files changed

+288
-0
lines changed

15 files changed

+288
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.DS_Store
3+
*~
4+
*.log
5+
npm-debug.log
6+
package-lock.json

.jshintrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"curly": true,
3+
"eqeqeq": true,
4+
"immed": true,
5+
"newcap": true,
6+
"noarg": true,
7+
"sub": true,
8+
"undef": true,
9+
"unused": true,
10+
"eqnull": true,
11+
"browser": true,
12+
"node": true,
13+
"strict": true,
14+
"globalstrict": true,
15+
"white": true,
16+
"indent": 2,
17+
"maxlen": 100,
18+
"globals": {
19+
"process": false,
20+
"global": false,
21+
"require": false,
22+
"console": false,
23+
"describe": false,
24+
"before": false,
25+
"beforeEach": false,
26+
"after": false,
27+
"afterEach": false,
28+
"it": false,
29+
"emit": false,
30+
"mocha": false
31+
}
32+
}

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.git*
2+
dist
3+
node_modules
4+
.DS_Store
5+
*~
6+
npm-debug.log

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# replicate-couchdb-cluster
2+
3+
A fault-tolerant way to replicate an entire CouchDB cluster
4+
5+
6+
## [Testing](TESTING.md)

TESTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Testing
2+
3+
## Test in node
4+
5+
This will run the tests in node:
6+
7+
$ npm run node-test
8+
9+
You can also check for 100% code coverage using:
10+
11+
$ npm run node-full-test
12+
You can then view the test coverage by opening cache/coverage/node/lcov-report/index.html in a browser
13+
14+
Run specific tests:
15+
16+
$ npm run node-test -- -- -g 'some reg-ex'
17+
18+
Run specific tests and generate code coverage:
19+
20+
$ npm run node-test -- -- --coverage -g 'some reg-ex'
21+
22+
23+
## Manual browser tests
24+
25+
$ npm run browser-server
26+
Use any browser to visit http://127.0.0.1:8001/index.html
27+
And you can filter the tests, e.g. http://127.0.0.1:8001/index.html?grep=reg-ex
28+
29+
30+
## Automated browser tests
31+
32+
phantomjs:
33+
34+
$ npm run browser-test-phantomjs
35+
36+
You can also filter the tests, e.g.
37+
38+
$ npm run browser-test-phantomjs -- -g 'some reg-ex'
39+
40+
Chrome:
41+
42+
Note: you must have Chrome installed
43+
44+
$ npm run browser-test-phantomjs -- -b selenium:chrome
45+
46+
Firefox:
47+
48+
Note: you must have Firefox installed
49+
50+
$ npm run browser-test-phantomjs -- -b selenium:firefox
51+
52+
Test in phantomjs, generate code coverage and check for 100% coverage:
53+
54+
$ npm run browser-coverage-full-test
55+
You can then view the test coverage by opening cache/coverage/browser/lcov-report/index.html in any browser

beautify.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"indent_size": 2,
3+
"jslint_happy": true,
4+
"wrap_line_length": 100,
5+
"end_with_newline": true
6+
}

cache/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

circle.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Doesn't actually work!
2+
# node:
3+
# version: 7.10.0
4+
5+
dependencies:
6+
pre:
7+
- nvm install 7.10.0
8+
- nvm use 7.10.0 && npm install -g npm
9+
10+
override:
11+
- nvm use 7.10.0 && npm install
12+
13+
test:
14+
pre:
15+
- nvm use 7.10.0 && npm run assert-beautified
16+
- nvm use 7.10.0 && npm run jshint
17+
18+
override:
19+
- nvm use 7.10.0 && npm run node-full-test
20+
- nvm use 7.10.0 && npm run browser-test-phantomjs
21+
- nvm use 7.10.0 && npm run browser-coverage-full-test

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict';
2+
3+
module.exports = require('./scripts');

0 commit comments

Comments
 (0)