Skip to content
Merged
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
9 changes: 8 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
- image: circleci/node:8.12

steps:
- checkout
Expand All @@ -21,3 +21,10 @@ jobs:

- run: npm run lint
- run: npm run test

## Process test artifacts (reports, coverage etc)
- store_artifacts:
path: mochawesome-report
- run: (cat ./coverage/lcov.info | npx coveralls) || true
- store_artifacts:
path: coverage
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "airbnb-base",
"root": true,
"env": {
"node": true
"node": true,
"mocha": true
},
"rules": {
"no-const-assign": "warn",
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ data
package-lock.json
yarn.lock
.vscode
coverage
.nyc_output
mochawesome-report
7 changes: 7 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"reporter": [
"lcov",
"text",
"html"
]
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"scripts": {
"lint": "./node_modules/.bin/eslint .",
"test": "echo 'No tests yet'; exit 0"
"test": "nyc mocha"
},
"main": "index.js",
"bin": {
Expand Down Expand Up @@ -45,6 +45,9 @@
"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.9.0"
"eslint-plugin-import": "^2.9.0",
"mocha": "^5.2.0",
"mochawesome": "^3.1.1",
"nyc": "^13.1.0"
}
}
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
[![NPM Downloads][npm-dl-img]][npm-stat-url]
[![MIT License][license-img]][license-link]
[![Build status][circle-img]][circle-url]
[![Code coverage][coveralls-img]][coveralls-url]

[npm-url]: https://npmjs.org/package/dbclone
[npm-stat-url]: https://npm-stat.com/charts.html?package=dbclone
[npm-img]: https://img.shields.io/npm/v/dbclone.svg
[npm-dl-img]: https://img.shields.io/npm/dm/dbclone.svg
[circle-img]: https://img.shields.io/circleci/project/github/vot/dbclone/master.svg
[circle-url]: https://circleci.com/gh/vot/dbclone/tree/master
[coveralls-img]: https://coveralls.io/repos/github/vot/dbclone/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/vot/anishkny/dbclone?branch=master

[license-img]: https://img.shields.io/badge/license-MIT-blue.svg
[license-link]: https://spdx.org/licenses/MIT
Expand Down
8 changes: 8 additions & 0 deletions test/lib.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const dbclone = require('../lib');

describe('Library tests', () => {
it('should import data', async () => {
console.log(dbclone);
// TODO: Add actual test
});
});
1 change: 1 addition & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--reporter mochawesome