In this integration test example, we hit the GET /projects (https://circleci.com/docs/api/v1-reference/#projects) endpoint in CircleCI. Here is the code testing this endpoint:
'use strict';const request = require('supertest');const assert = require('assert');const CIRCLECI_API = { // List of all the projects you're following on CircleCI, with build information organized by branch getProjects: 'https://circleci.com/api/v1.1'};describe('Testing CircleCI API Endpoints', function() { it('the /projects endpoints should return 200 with a body', function() { return request(CIRCLECI_API.getProjects) .get(`/projects?circle-token=${process.env.CIRCLECI_API_TOKEN_GITHUB}`) .set('Accept', 'application/json' ...