mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-10-31 14:39:48 +00:00
Rebrand: polkadot → pezkuwi, substrate → bizinikiwi, kusama → dicle
This commit is contained in:
commit
d5f038faea
1383 files changed
+1088018
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// Copyright 2017-2025 @pezkuwi/rpc-provider authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||
|
||||
import { RpcCoder } from './index.js';
|
||||
|
||||
describe('encodeObject', (): void => {
|
||||
let coder: RpcCoder;
|
||||
|
||||
beforeEach((): void => {
|
||||
coder = new RpcCoder();
|
||||
});
|
||||
|
||||
it('encodes a valid JsonRPC object', (): void => {
|
||||
expect(
|
||||
coder.encodeObject('method', ['a', 'b'])
|
||||
).toEqual([1, {
|
||||
id: 1,
|
||||
jsonrpc: '2.0',
|
||||
method: 'method',
|
||||
params: ['a', 'b']
|
||||
}]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user