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

Yoast / wordpress-seo / a7886492b145fdf70261f7ca2cb0fbcb3562b15b

25 Nov 2024 01:47PM UTC coverage: 54.184% (-0.03%) from 54.215%
a7886492b145fdf70261f7ca2cb0fbcb3562b15b

Pull #21852

github

web-flow
Merge b930e736a into 16577a01e
Pull Request #21852: 339 dashboard use request to get the actual scores

7593 of 13670 branches covered (55.54%)

Branch coverage included in aggregate %.

0 of 77 new or added lines in 15 files covered. (0.0%)

989 existing lines in 3 files now uncovered.

29764 of 55275 relevant lines covered (53.85%)

41521.03 hits per line

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

0.0
/packages/js/src/dashboard/fetch/fetch-json.js
1
import { getResponseError } from "./get-response-error";
2

3
/**
4
 * @param {string|URL} url The URL to fetch from.
5
 * @param {RequestInit} options The request options.
6
 * @returns {Promise<any|Error>} The promise of a result, or an error.
7
 */
NEW
8
export const fetchJson = async( url, options ) => {
×
NEW
9
        try {
×
NEW
10
                const response = await fetch( url, options );
×
NEW
11
                if ( ! response.ok ) {
×
NEW
12
                        throw getResponseError( response );
×
13
                }
NEW
14
                return response.json();
×
15
        } catch ( e ) {
NEW
16
                return Promise.reject( e );
×
17
        }
18
};
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

© 2025 Coveralls, Inc