Skip to content
This repository was archived by the owner on Dec 10, 2020. It is now read-only.

Commit 5b98930

Browse files
committed
lint, test cmd without cli, remove now-unneeded karma exclude
1 parent 2623c5a commit 5b98930

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

karma.conf.js

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ module.exports = function (config) {
44

55
files: ['lib/**/*.ts', 'test/blockchain/chain.spec.ts'],
66

7-
exclude: ['test/integration/**/*.ts', 'test/cli/**/*.ts'],
8-
97
preprocessors: {
108
'**/*.ts': ['karma-typescript'],
119
},

lib/net/server/rlpxserver.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export class RlpxServer extends Server {
140140
*/
141141
async stop(): Promise<boolean> {
142142
if (this.started) {
143-
this.rlpx!.destroy() // eslint-disable-line no-extra-semi
143+
this.rlpx!.destroy()
144144
this.dpt!.destroy()
145145
await super.stop()
146146
this.started = false

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@
1818
"build:browser": "tsc -p ./tsconfig.browser.json && npm run bundle && rm -rf dist.browser",
1919
"bundle": "webpack",
2020
"client:start": "ts-node bin/cli.ts",
21-
"coverage": "nyc npm run coverage:test && nyc report --reporter=lcov",
22-
"coverage:test": "npm run tape -- 'test/**/*.spec.ts'",
21+
"coverage": "nyc npm run test && nyc report --reporter=lcov",
2322
"docs:build": "typedoc --tsconfig tsconfig.prod.json",
2423
"lint": "ethereumjs-config-lint",
2524
"lint:fix": "ethereumjs-config-lint-fix",
2625
"tape": "tape -r ts-node/register",
27-
"test": "npm run tape -- 'test/**/*.spec.ts'",
26+
"test": "npm run tape -- 'test/!(cli)/**/*.spec.ts'",
2827
"test:unit": "npm run tape -- 'test/!(integration|cli)/**/*.spec.ts'",
2928
"test:integration": "npm run tape -- 'test/integration/**/*.spec.ts'",
3029
"test:cli": "npm run build:node && npm run tape -- 'test/cli/*.spec.ts'",

test/cli/cli.spec.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import tape from 'tape'
44
tape('[CLI]', (t) => {
55
t.test('should begin downloading blocks', { timeout: 260000 }, (t) => {
66
const file = require.resolve('../../dist/bin/cli.js')
7-
const child = spawn(process.execPath, [file])
7+
const args = [file, '--loglevel', 'debug']
8+
const child = spawn(process.execPath, args)
89

910
const timeout = setTimeout(() => {
1011
child.kill('SIGINT')

0 commit comments

Comments
 (0)