mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2025-04-21 13:03:07 +03:00
28 lines
672 B
TypeScript
28 lines
672 B
TypeScript
import 'cadesplugin';
|
|
import { getCadesProp } from './getCadesProp';
|
|
|
|
const cadesPropertyContentMock = 'content of a cades property';
|
|
|
|
const executionSteps = [Symbol('step 0')];
|
|
|
|
const executionFlow = {
|
|
[executionSteps[0]]: cadesPropertyContentMock,
|
|
};
|
|
|
|
window.cadesplugin.__defineExecutionFlow(executionFlow);
|
|
|
|
describe('getCadesProp', () => {
|
|
test('returns contents of a cades prop', async () => {
|
|
const cadesPropertyContent = await getCadesProp.call(
|
|
{
|
|
_cadesCertificate: {
|
|
cadesProperty: executionSteps[0],
|
|
},
|
|
},
|
|
'cadesProperty',
|
|
);
|
|
|
|
expect(cadesPropertyContent).toEqual(cadesPropertyContentMock);
|
|
});
|
|
});
|