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

panates / opra / 29494915195

16 Jul 2026 11:33AM UTC coverage: 83.024% (+0.4%) from 82.653%
29494915195

push

github

erayhanoglu
1.29.1

4118 of 5238 branches covered (78.62%)

Branch coverage included in aggregate %.

34348 of 41093 relevant lines covered (83.59%)

239.47 hits per line

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

51.35
/packages/testing/src/api-expect/api-expect-error.ts
1
import '../expect-extend/index.js';
1✔
2
import { omitNullish } from '@jsopen/objects';
1✔
3
import { type ErrorIssue } from '@opra/common';
1✔
4
import { expect } from 'expect';
1✔
5
import { ApiExpectBase } from './api-expect-base.js';
1✔
6

1✔
7
export interface MatchingErrorIssue {
1✔
8
  message?: ErrorIssue['message'] | RegExp;
×
9
  system?: ErrorIssue['system'] | RegExp;
×
10
  code?: ErrorIssue['code'] | RegExp;
×
11
  details?: ErrorIssue['details'] | RegExp;
×
12
  diagnostics?: ErrorIssue['diagnostics'] | RegExp;
×
13

×
14
  [index: string]: any;
×
15
}
×
16

×
17
export class ApiExpectError extends ApiExpectBase {
×
18
  toMatch(expected: string | RegExp | MatchingErrorIssue) {
×
19
    try {
×
20
      if (typeof expected === 'string')
×
21
        expected = { message: expected } as MatchingErrorIssue;
×
22
      else if (expected instanceof RegExp) {
×
23
        expected = {
×
24
          message: expect.stringMatching(expected) as any,
×
25
        };
×
26
      } else expected = omitNullish(expected);
1✔
27
      this._expect(this.response.body.errors).toEqual(
1✔
28
        expect.arrayContaining([expect.objectContaining(expected)]),
1✔
29
      );
1✔
30
    } catch (e: any) {
1✔
31
      Error.captureStackTrace(e, this.toMatch);
1✔
32
      throw e;
1✔
33
    }
1✔
34
    return this;
1✔
35
  }
1✔
36
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc