-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various CLI fixes and UX improvements (#2952)
### Description - Fixes hyperlane-xyz/issues#747 - Fixes hyperlane-xyz/issues#746 - Fixes hyperlane-xyz/issues#730 - Fixes hyperlane-xyz/issues#727 - Fixes hyperlane-xyz/issues#729 - Fixes #2234 - Fixes hyperlane-xyz/issues#728 ### Drive-by changes Make chai and mocha versions consistent across monorepo ### Backward compatibility Yes ### Testing Setup unit testing for CLI and run as part of CI jobs
- Loading branch information
Showing
21 changed files
with
159 additions
and
146 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,5 @@ | ||
--- | ||
'@hyperlane-xyz/cli': patch | ||
--- | ||
|
||
Various user experience improvements |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extensions": ["ts"], | ||
"spec": ["src/**/*.test.*"], | ||
"node-option": [ | ||
"experimental-specifier-resolution=node", | ||
"loader=ts-node/esm" | ||
] | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { expect } from 'chai'; | ||
|
||
import { readChainConfigs } from './chain.js'; | ||
|
||
describe('readChainConfigs', () => { | ||
const chainToMetadata = readChainConfigs('./examples/chain-config.yaml'); | ||
|
||
it('parses and validates correctly', () => { | ||
expect(chainToMetadata.mychainname.chainId).to.equal(1234567890); | ||
}); | ||
|
||
it('merges core configs', () => { | ||
expect(chainToMetadata.sepolia.chainId).to.equal(11155111); | ||
expect(chainToMetadata.sepolia.rpcUrls[0].http).to.equal( | ||
'https://mycustomrpc.com', | ||
); | ||
}); | ||
}); |
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
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
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,10 @@ | ||
import { expect } from 'chai'; | ||
|
||
import { getTimestampForFilename } from './time.js'; | ||
|
||
describe('getTimestampForFilename', () => { | ||
it('structures timestamp correctly', () => { | ||
const filename = getTimestampForFilename(); | ||
expect(filename).to.match(/\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2}/); | ||
}); | ||
}); |
Oops, something went wrong.