@microsoft/useragent-sdk
Version:
SDK for building decentralized identity wallets and enterprise agents.
31 lines (22 loc) • 974 B
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import HubCommitQueryRequest from '../../../src/hubSession/requests/HubCommitQueryRequest';
describe('HubCommitQueryRequest', () => {
describe('getRequestJson()', () => {
it('should return a complete request body', async () => {
const req = new HubCommitQueryRequest({
object_id: ['1234'],
});
const json = await req.getRequestJson();
expect(json).toEqual({
'@context': 'https://schema.identity.foundation/0.1',
'@type': 'CommitQueryRequest',
query: {
object_id: ['1234'],
},
});
});
});
});