This repository has been archived by the owner on Jun 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from ethereumjs/refactorTests
Refactor test suite
- Loading branch information
Showing
16 changed files
with
1,295 additions
and
1,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [8.x, 10.x, 12.x, 13.x] | ||
|
||
steps: | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- uses: actions/checkout@v1 | ||
- run: npm install | ||
- run: npm run test | ||
|
||
- name: Upload coverage to Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,23 @@ | ||
module.exports = function (config) { | ||
module.exports = function(config) { | ||
config.set({ | ||
frameworks: ['browserify', 'detectBrowsers', 'mocha'], | ||
files: [ | ||
'test/*.js' | ||
], | ||
frameworks: ['mocha', 'karma-typescript'], | ||
files: ['src/**/*.ts', 'test/**/*.ts'], | ||
preprocessors: { | ||
'test/*.js': ['browserify', 'env'] | ||
'**/*.ts': ['karma-typescript'], | ||
}, | ||
singleRun: true, | ||
plugins: [ | ||
'karma-browserify', | ||
'karma-chrome-launcher', | ||
'karma-env-preprocessor', | ||
'karma-firefox-launcher', | ||
'karma-detect-browsers', | ||
'karma-mocha' | ||
], | ||
browserify: { | ||
'transform': [ | ||
[ | ||
'babelify', | ||
{ | ||
'presets': [ | ||
'env' | ||
] | ||
} | ||
] | ||
], | ||
debug: true | ||
plugins: ['karma-mocha', 'karma-typescript', 'karma-chrome-launcher', 'karma-firefox-launcher'], | ||
karmaTypescriptConfig: { | ||
bundlerOptions: { | ||
entrypoints: /\.spec\.ts$/, | ||
}, | ||
}, | ||
envPreprocessor: [ | ||
'RANDOM_TESTS_REPEAT', | ||
'TRAVIS' | ||
], | ||
detectBrowsers: { | ||
enabled: true, | ||
usePhantomJS: false, | ||
postDetection: function (availableBrowser) { | ||
if (availableBrowser.includes('Chrome')) { | ||
return ['ChromeHeadless'] | ||
} | ||
|
||
var browsers = ['Chrome', 'Firefox'] | ||
return browsers.filter(function (browser) { | ||
return availableBrowser.indexOf(browser) !== -1 | ||
}) | ||
} | ||
} | ||
colors: true, | ||
reporters: ['progress', 'karma-typescript'], | ||
browsers: ['FirefoxHeadless', 'ChromeHeadless'], | ||
singleRun: true, | ||
concurrency: Infinity, | ||
// Fail after timeout | ||
browserDisconnectTimeout: 100000, | ||
browserNoActivityTimeout: 100000, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.