Pull out and generalize semverMatcher
This commit is contained in:
parent
d5f8e6316d
commit
c7b0b2c74d
@ -19,6 +19,7 @@ import {
|
||||
getRandomizedHackatom,
|
||||
makeRandomAddress,
|
||||
pendingWithoutWasmd,
|
||||
semverMatcher,
|
||||
tendermintAddressMatcher,
|
||||
tendermintHeightMatcher,
|
||||
tendermintIdMatcher,
|
||||
@ -315,7 +316,7 @@ describe("RestClient", () => {
|
||||
name: "wasm",
|
||||
server_name: "wasmd",
|
||||
client_name: "wasmcli",
|
||||
version: jasmine.stringMatching(/^0\.7\.[0-9]+(-[a-zA-Z0-9._]+)?$/),
|
||||
version: jasmine.stringMatching(semverMatcher),
|
||||
commit: jasmine.stringMatching(tendermintShortHashMatcher),
|
||||
build_tags: "netgo,ledger",
|
||||
go: jasmine.stringMatching(/^go version go1\.[0-9]+\.[0-9]+ linux\/amd64$/),
|
||||
|
||||
@ -61,6 +61,7 @@ export const tendermintIdMatcher = /^[0-9A-F]{64}$/;
|
||||
export const tendermintOptionalIdMatcher = /^([0-9A-F]{64}|)$/;
|
||||
export const tendermintAddressMatcher = /^[0-9A-F]{40}$/;
|
||||
export const tendermintShortHashMatcher = /^[0-9a-f]{40}$/;
|
||||
export const semverMatcher = /^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/;
|
||||
|
||||
// https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki#bech32
|
||||
export const bech32AddressMatcher = /^[\x21-\x7e]{1,83}1[02-9ac-hj-np-z]{38}$/;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user