feat: add cucumber

This commit is contained in:
Ricardo Arturo Cabral Mejia 2022-10-25 00:28:44 -04:00 committed by Ricardo Arturo Cabral Mejía
parent b00e3ce11f
commit 82d682e4a8
5 changed files with 1433 additions and 12 deletions

View File

@ -53,7 +53,7 @@ jobs:
- name: Install package dependencies
run: npm ci
- name: Run tests
run: npm run test
run: npm run test:unit
coverage:
name: Coverage
runs-on: ubuntu-latest

View File

@ -55,7 +55,7 @@ jobs:
- name: Install package dependencies
run: npm ci
- name: Run tests
run: npm run test
run: npm run test:unit
coverage:
name: Coverage
runs-on: ubuntu-latest

12
cucumber.js Normal file
View File

@ -0,0 +1,12 @@
const config = [
'test/integration/features/**/*.feature',
'--require-module ts-node/register',
'--require tests/integration/features/**/*.ts',
'--format progress-bar',
'--format json:report.json',
'--publish-quiet',
].join(' ')
module.exports = {
default: config,
}

1419
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,9 +27,10 @@
"db:migrate": "knex migrate:latest",
"db:migrate:rollback": "knex migrate:rollback",
"db:seed": "knex seed:run",
"test": "mocha 'test/**/*.spec.ts'",
"test:watch": "npm run test -- --min --watch --watch-files src/**/*,test/**/*",
"cover": "nyc npm run test",
"test:unit": "mocha 'test/**/*.spec.ts'",
"test:integration": "cucumber-js",
"test:unit:watch": "npm run test:unit -- --min --watch --watch-files src/**/*,test/**/*",
"cover": "nyc npm run test:unit",
"docker:build": "docker build -t nostr-ts-relay .",
"predocker:compose:up": "[ -d \"$HOME/.nostr\" ] || mkdir -p $HOME/.nostr",
"docker:compose:up": "docker compose up --build",
@ -51,6 +52,7 @@
},
"homepage": "https://github.com/Cameri/nostr-ts-relay#readme",
"devDependencies": {
"@cucumber/cucumber": "8.7.0",
"@types/chai": "^4.3.1",
"@types/chai-as-promised": "^7.1.5",
"@types/mocha": "^9.1.1",
@ -79,7 +81,7 @@
"dependencies": {
"@noble/secp256k1": "1.7.0",
"joi": "17.6.1",
"knex": "^2.3.0",
"knex": "2.3.0",
"pg": "8.8.0",
"pg-query-stream": "4.2.3",
"ramda": "0.28.0",