-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* for PoA network like Rinkeby "miner" field is empty due to consensus algorithm ethereum/EIPs#225 Miner address is derivable from "extra" field. Last 65 bytes are miner signature * use node version 15 in Github Action * Jest doesn't recognize Buffer as Uint8Array. To fix it added custom jest environment * fix linter error
- Loading branch information
Showing
6 changed files
with
56 additions
and
4 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
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ module.exports = { | |
transform: { | ||
"^.+\\.ts$": "ts-jest" | ||
}, | ||
testEnvironment: './src/jest-environment.js', | ||
}; |
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,15 @@ | ||
const NodeEnvironment = require('jest-environment-node'); | ||
|
||
class WatcherEnvironment extends NodeEnvironment{ | ||
constructor (config) { | ||
super(Object.assign({}, config, { | ||
globals: Object.assign({}, config.globals, { | ||
Uint8Array: Uint8Array, | ||
ArrayBuffer: ArrayBuffer | ||
}) | ||
})) | ||
} | ||
} | ||
|
||
|
||
module.exports = WatcherEnvironment |
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