{"size": 972, "ext": "js", "max_stars_repo_path": "src/Model/MoreModel/MoreModel.test.js", "max_stars_repo_name": "aburdiss/BrassExcerpts", "max_stars_repo_stars_event_min_datetime": "2021-08-28T16:08:17.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-15T08:09:09.000Z", "max_issues_repo_path": "src/Model/MoreModel/MoreModel.test.js", "max_issues_repo_name": "aburdiss/BrassExcerpts", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Model/MoreModel/MoreModel.test.js", "max_forks_repo_name": "aburdiss/BrassExcerpts", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.5789473684, "max_line_length": 74, "alphanum_fraction": 0.5339506173}
const fetch = require('node-fetch');
const https = require('https');
const httpsAgent = new https.Agent({
  rejectUnauthorized: false,
});

import { RESOURCES, ABOUT } from './MoreModel';

describe('resource links', () => {
  RESOURCES.map(async (resource) => {
    if (!['13C'].includes(resource.id)) {
      test(resource.value, async () => {
        if (resource.type == 'link' && resource.link.startsWith('http')) {
          const resp = await fetch(resource.link, {
            method: 'GET',
            agent: httpsAgent,
          });
          expect(resp.status).toEqual(200);
        }
      });
    }
  });
});

describe('about links', () => {
  ABOUT.map(async (about) => {
    test(about.value, async () => {
      if (about.type == 'link' && about.link.startsWith('http')) {
        const resp = await fetch(about.link, {
          method: 'GET',
          agent: httpsAgent,
        });
        expect(resp.status).toEqual(200);
      }
    });
  });
});
