This commit is contained in:
Alexander Zakharov 2021-05-12 20:56:15 +03:00
parent a0d60b0de8
commit ebe130c9b0

View File

@ -1,14 +1,7 @@
import 'cadesplugin'; import 'cadesplugin';
import { getCspVersion } from './getCspVersion'; import { getCspVersion } from './getCspVersion';
const executionSteps = [ const executionSteps = [Symbol('step 0'), Symbol('step 1'), Symbol('step 2')];
Symbol('step 0'),
Symbol('step 1'),
Symbol('step 2'),
Symbol('step 3'),
Symbol('step 4'),
Symbol('step 5'),
];
// "any" because of using toString on the literal // "any" because of using toString on the literal
const executionFlow: any = { const executionFlow: any = {
@ -22,9 +15,7 @@ const executionFlow: any = {
}; };
window.cadesplugin.__defineExecutionFlow(executionFlow); window.cadesplugin.__defineExecutionFlow(executionFlow);
window.cadesplugin.CreateObjectAsync.mockImplementation( window.cadesplugin.CreateObjectAsync.mockImplementation(() => executionSteps[0]);
() => executionSteps[0],
);
describe('getCspVersion', () => { describe('getCspVersion', () => {
test('returns information about CSP', async () => { test('returns information about CSP', async () => {