Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 2
jobs:
build-node-common: &common-build
docker:
# The docker section here is not used, but required
- image: circleci/node:6.0.0

working_directory: ~/repo

steps:
- checkout

- run: npm install

- run: npm run lint

- run: npm test

- run: npm run test-phantom

- run: npm run coverage

#- run: npm run report-coverage

build-6.12.2:
<<: *common-build
docker:
# Travis was using Node.js v5.12.0 which CircleCI does have, therefore use closest match
- image: circleci/node:6.12.2

build-8.9.3:
<<: *common-build
docker:
- image: circleci/node:8.9.3

workflows:
version: 2
build_all:
jobs:
- build-6.12.2
- build-8.9.3
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node-websql [![Build Status](https://travis-ci.org/nolanlawson/node-websql.svg?branch=master)](https://travis-ci.org/nolanlawson/node-websql) [![Coverage Status](https://coveralls.io/repos/github/nolanlawson/node-websql/badge.svg?branch=master&nonce=foo)](https://coveralls.io/github/nolanlawson/node-websql?branch=master)
node-websql
====

The [WebSQL Database API][websql], implemented for Node
Expand Down
3 changes: 2 additions & 1 deletion test/pouchdb-websql.js
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ function preprocessAttachments(docInfos, blobType, callback) {
if (asBinary.error) {
return callback(asBinary.error);
}
var asBinaryBuffer = new buffer(att.data, 'base64');

att.length = asBinary.length;
if (blobType === 'blob') {
Expand All @@ -889,7 +890,7 @@ function preprocessAttachments(docInfos, blobType, callback) {
} else { // binary
att.data = asBinary;
}
res(asBinary).then(function (result) {
res(asBinaryBuffer).then(function (result) {
att.digest = 'md5-' + result;
callback();
});
Expand Down