Skip to content

Commit

Permalink
chore: improve setup (#28)
Browse files Browse the repository at this point in the history
* chore: improve setup
* test: add test runner
  • Loading branch information
simone-sanfratello authored Nov 8, 2023
1 parent 9cecd9e commit 0eea5cf
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .c8rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"exclude": [
"misc/*",
"examples/*",
"fixtures/*",
"test/*"
]
}
File renamed without changes.
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
"main": "lib/index.js",
"author": "Colin J. Ihrig <[email protected]> (http://www.cjihrig.com/)",
"scripts": {
"test": "npm run lint && node --test",
"lint": "standard | snazzy"
"test": "npm run lint && c8 node test/runner.js",
"lint": "standard | snazzy",
"lint:fix": "standard --fix"
},
"dependencies": {
"@mercuriusjs/subscription-client": "^1.0.0",
"graphql": "^16.8.0",
"undici": "^5.22.1"
"graphql": "^16.8.1",
"undici": "^5.27.2"
},
"devDependencies": {
"fastify": "^4.22.0",
"mercurius": "^13.1.0",
"c8": "^8.0.1",
"fastify": "^4.24.3",
"glob": "^10.3.10",
"mercurius": "^13.2.2",
"snazzy": "^9.0.0",
"standard": "^17.1.0"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions test/runner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict'

const { tap, spec } = require('node:test/reporters')
const { run } = require('node:test')
const glob = require('glob').globSync

/* eslint-disable new-cap */
const reporter = process.stdout.isTTY ? new spec() : tap

const files = glob('test/**/*.test.js')

run({ files, timeout: 30_000, concurrency: files.length })
.compose(reporter)
.pipe(process.stdout)
File renamed without changes.

0 comments on commit 0eea5cf

Please sign in to comment.