• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pustart / crypto-pro-csp / 17460684880

04 Sep 2025 10:16AM UTC coverage: 79.504%. First build
17460684880

Pull #3

github

web-flow
Merge 29283e818 into 0348d8315
Pull Request #3: refactor: заменяет функции eval на генераторы

200 of 308 branches covered (64.94%)

Branch coverage included in aggregate %.

157 of 229 new or added lines in 13 files covered. (68.56%)

537 of 619 relevant lines covered (86.75%)

10.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

77.78
/src/api/certificate/getAlgorithm.ts
1
import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';
4✔
2
import { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';
4✔
3
import { Certificate } from './certificate';
4

5
export interface AlgorithmInfo {
6
  algorithm: string;
7
  oid: string;
8
}
9

10
/**
11
 * Возвращает информацию об алгоритме сертификата
12
 *
13
 * @returns информацию об алгоритме и его OID'е
14
 */
15
export const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {
4✔
16
  const { cadesplugin } = window;
2✔
17
  const cadesCertificate = (this as Certificate)._cadesCertificate;
2✔
18

19
  return cadesplugin.async_spawn(function* getAlgorithm() {
2✔
20
    const algorithmInfo: AlgorithmInfo = {
2✔
21
      algorithm: null,
22
      oid: null,
23
    };
24
    let cadesPublicKey;
25
    try {
26
      cadesPublicKey = yield cadesCertificate.PublicKey();
2✔
27
      cadesPublicKey = yield cadesPublicKey.Algorithm;
2✔
28
      algorithmInfo.algorithm = yield cadesPublicKey.FriendlyName;
2✔
29
      algorithmInfo.oid = yield cadesPublicKey.Value;
2✔
30
    } catch (error) {
NEW
31
      console.error(error);
×
32

NEW
33
      throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');
×
34
    }
35

36
    return algorithmInfo;
2✔
37
  });
38
});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc