-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bindings: Add
ProtocolParameters
tests (#1508)
* update and re-endable protocol parameters test * python: protocol parameters from/to dict * protocol_parameters.json * Use hex encoded bytes * Fix params_serde_hash * Cleanup rust test * Add MultiAddress packable test * add python test * add nodejs test * add protocol_parameters.spec.ts * partially ready * add protocol parameters hash method * comments * rm some imports * some fixes * add python hash check * doc fixes * fmt --------- Co-authored-by: Thibault Martinez <[email protected]>
- Loading branch information
1 parent
6d91fc2
commit 5b36631
Showing
17 changed files
with
7,684 additions
and
5,498 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
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,21 @@ | ||
// Copyright 2023 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import 'reflect-metadata'; | ||
|
||
import { expect, describe, it } from '@jest/globals'; | ||
import * as protocol_parameters from '../../../../sdk/tests/types/fixtures/protocol_parameters.json'; | ||
import { ProtocolParameters } from '../../lib/types/models/info/node-info-protocol'; | ||
import { Utils } from '../../'; | ||
|
||
describe('ProtocolParameters tests', () => { | ||
|
||
it('compares ProtocolParameters hash from a fixture', async () => { | ||
|
||
const params = protocol_parameters.params as unknown as ProtocolParameters; | ||
const hash = Utils.protocolParametersHash(params); | ||
const expected_hash = protocol_parameters.hash; | ||
|
||
expect(hash).toEqual(expected_hash); | ||
}); | ||
}); |
Oops, something went wrong.