Skip to content

Instantly share code, notes, and snippets.

View Veraclins's full-sized avatar

Agada Clinton Innocent Veraclins

View GitHub Profile
import chai from 'chai';
import chaiHttp from 'chai-http';
import { server } from '../index'; // Server is defined in the api entry point (index.js)
const expect = chai.expect;
chai.use(chaiHttp);
describe('When a User sends a GET get Request to /api/profiles/:username', () => {
it('it should return the profile of the user with the provided username', (done) => {
chai.request(server)
import models from '../models';
const { Article, Rating } = models;
/**
* This class contains all the methods responsible for rating
* articles on the app
* It is made up static methods which can be called from anywhere in the app.
*/
export default class articleRatingController {
/**