Skip to content

Commit 35f1747

Browse files
committed
convert mocha to tape
1 parent b100d13 commit 35f1747

13 files changed

+1136
-1053
lines changed

.eslintrc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
module.exports = {
2-
extends: '@ethereumjs/eslint-config-defaults',
3-
env: {
4-
mocha: true
5-
}
2+
extends: '@ethereumjs/eslint-config-defaults'
63
}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- run: npm install
2525

2626
- run: npm run lint
27-
- run: npm run test
27+
- run: npm run coverage
2828

2929
- uses: codecov/codecov-action@v1
3030
if: matrix.node-version == '12.x'

karma.conf.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
module.exports = function(config) {
22
config.set({
3-
frameworks: ['mocha', 'karma-typescript'],
3+
frameworks: ['tap', 'karma-typescript'],
44
files: ['src/**/*.ts', 'test/**/*.ts'],
55
preprocessors: {
66
'**/*.ts': ['karma-typescript']
77
},
8-
plugins: ['karma-mocha', 'karma-typescript', 'karma-chrome-launcher', 'karma-firefox-launcher'],
98
karmaTypescriptConfig: {
109
bundlerOptions: {
1110
entrypoints: /\.spec\.ts$/
@@ -16,7 +15,7 @@ module.exports = function(config) {
1615
reporters: ['progress', 'karma-typescript'],
1716
browsers: ['FirefoxHeadless', 'ChromeHeadless'],
1817
singleRun: true,
19-
concurrency: Infinity,
18+
concurrency: 1,
2019
// Fail after timeout
2120
browserDisconnectTimeout: 100000,
2221
browserNoActivityTimeout: 100000

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
"scripts": {
1414
"build": "ethereumjs-config-ts-build",
1515
"prepublishOnly": "npm run test && npm run build",
16+
"coverage": "ethereumjs-config-coverage",
1617
"docs:build": "npx typedoc --options typedoc.js",
1718
"lint": "ethereumjs-config-lint",
1819
"lint:fix": "ethereumjs-config-lint-fix",
1920
"test": "npm run test:node && npm run test:browser",
2021
"test:browser": "karma start karma.conf.js",
21-
"test:node": "nyc --reporter=lcov mocha --require ts-node/register 'test/*.spec.ts'",
22+
"test:node": "tape -r ts-node/register test/*.spec.ts",
2223
"tsc": "ethereumjs-config-tsc"
2324
},
2425
"husky": {
@@ -97,18 +98,18 @@
9798
"@ethereumjs/config-typescript": "^2.0.0",
9899
"@ethereumjs/eslint-config-defaults": "^2.0.0",
99100
"@types/assert": "^1.5.4",
100-
"@types/mocha": "^8.2.0",
101101
"@types/node": "^11.9.0",
102102
"@types/secp256k1": "^4.0.1",
103+
"@types/tape": "^4.13.0",
103104
"husky": "^2.1.0",
104105
"karma": "^5.0.2",
105106
"karma-chrome-launcher": "^2.0.0",
106107
"karma-firefox-launcher": "^1.0.0",
107-
"karma-mocha": "^2.0.0",
108+
"karma-tap": "^4.2.0",
108109
"karma-typescript": "^4.1.1",
109-
"mocha": "^8.2.1",
110110
"nyc": "^15.0.0",
111111
"prettier": "^1.15.3",
112+
"tape": "^5.2.2",
112113
"ts-node": "^8.6.2",
113114
"typedoc": "next",
114115
"typedoc-plugin-markdown": "^2.2.16",

0 commit comments

Comments
 (0)