fix #24: add Travis and Coveralls
This commit is contained in:
Родитель
c9f3226185
Коммит
5e008cdd8d
|
@ -1,2 +1,4 @@
|
|||
node_modules
|
||||
.env
|
||||
.nyc_output
|
||||
.coveralls.yml
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
tests/
|
|
@ -0,0 +1,4 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
- "lts/*"
|
|
@ -18,7 +18,7 @@ for more background, objectives, key use cases.
|
|||
|
||||
### Requirements
|
||||
|
||||
* [Node](https://nodejs.org/) 8 (with npm)
|
||||
* [Node](https://nodejs.org/) 9 (with npm)
|
||||
|
||||
### Install
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
13
package.json
13
package.json
|
@ -16,8 +16,12 @@
|
|||
"popsicle": "^9.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^3.0.0",
|
||||
"eslint": "^4.17.0",
|
||||
"eslint-plugin-node": "^6.0.0"
|
||||
"eslint-plugin-node": "^6.0.0",
|
||||
"faucet": "^0.0.1",
|
||||
"nyc": "^11.4.1",
|
||||
"tape": "^4.8.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
@ -25,6 +29,9 @@
|
|||
"homepage": "https://github.com/mozilla/blurts-server#readme",
|
||||
"license": "ISC",
|
||||
"main": "server.js",
|
||||
"nyc": {
|
||||
"all": true
|
||||
},
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -32,6 +39,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"start": "node server.js"
|
||||
"pretest": "eslint .",
|
||||
"start": "node server.js",
|
||||
"test": "nyc tape tests/**/*.js | faucet && nyc report --reporter=text-lcov | coveralls"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
"use strict";
|
||||
|
||||
const test = require("tape");
|
||||
|
||||
const gEmails = require("../subscribers");
|
||||
|
||||
test("gEmails is an object", (t) => {
|
||||
t.plan(1);
|
||||
t.equal(typeof(gEmails), "object");
|
||||
});
|
Загрузка…
Ссылка в новой задаче