chore: Organize tests (#292)

* chore: Organize tests.

* chore: Install Coveralls only on Travis.
This commit is contained in:
Ruben Verborgh 2020-10-31 17:52:10 +01:00 committed by GitHub
parent 1a45b65df7
commit 73a56d8682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 36 deletions

View File

@ -3,13 +3,23 @@ node_js:
- "10"
- "12"
- "14"
- "lts/*"
- "node"
script:
- npm run build
- npm run lint
- npm run validate
- npm run test
- .travis/validate-package.sh
after_success:
- npm run coveralls
cache: npm
- npm run lint
- npm run validate
- npm run test:unit
- npm run test:integration
- npm run test:deploy
jobs:
allow_failures:
- node_js: "node"
fast_finish: true
include:
- stage: test
name: Coveralls
node_js: "14"
script:
- npm run jest -- --coverage --coverageReporters=text-lcov | npx coveralls

25
package-lock.json generated
View File

@ -2903,19 +2903,6 @@
}
}
},
"coveralls": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.1.0.tgz",
"integrity": "sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==",
"dev": true,
"requires": {
"js-yaml": "^3.13.1",
"lcov-parse": "^1.0.0",
"log-driver": "^1.2.7",
"minimist": "^1.2.5",
"request": "^2.88.2"
}
},
"cross-fetch": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.5.tgz",
@ -7398,12 +7385,6 @@
"package-json": "^6.3.0"
}
},
"lcov-parse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz",
"integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=",
"dev": true
},
"leven": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
@ -7517,12 +7498,6 @@
"integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=",
"dev": true
},
"log-driver": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz",
"integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==",
"dev": true
},
"logform": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/logform/-/logform-2.2.0.tgz",

View File

@ -37,11 +37,14 @@
"build": "npm run build:ts && npm run build:components",
"build:ts": "tsc",
"build:components": "componentsjs-generator -s src",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"lint": "eslint . --ext .ts --cache",
"prepare": "npm run build",
"start": "node ./bin/server.js -p 3000",
"test": "jest",
"test": "npm run jest",
"jest": "jest",
"test:unit": "jest test/unit",
"test:integration": "jest --coverageThreshold '{}' test/integration",
"test:deploy": "test/deploy/validate-package.sh",
"validate": "componentsjs-compile-config urn:solid-server:default -c config/config-default.json -f > /dev/null",
"version": "manual-git-changelog onversion",
"watch": "nodemon --watch \"src/**/*.js\" --watch \"bin/**/*.js\" --exec npm start"
@ -99,7 +102,6 @@
"@typescript-eslint/eslint-plugin": "^4.1.1",
"@typescript-eslint/parser": "^4.1.1",
"componentjs-generator": "^1.1.0",
"coveralls": "^3.1.0",
"eslint": "^7.9.0",
"eslint-config-es": "^3.20.3",
"eslint-import-resolver-typescript": "^2.3.0",