import chai from 'chai';
import checkHttpStatus from '../../src/default/checkHttpStatus.js';
const expect = chai.expect;

describe('test checkHttpStatus', function() {
  it('should throw "Not found!" error', () => {
    const result = {
      response: {
        statusCode: 404,
      },
    };

    expect(checkHttpStatus.bind(null, result)).to.throw('Not found!');
  });

  it('should throw "Internal server error!" error', () => {
    const result = {
      response: {
        statusCode: 500,
      },
    };

    expect(checkHttpStatus.bind(null, result)).to.throw('Internal server error!');
  });
});

import chai from 'chai';
import checkHttpStatus from '../../src/default/checkHttpStatus.js';
const expect = chai.expect;

describe('test checkHttpStatus', function() {
  it('should throw "Not found!" error', () => {
    const result = {
      response: {
        statusCode: 404,
      },
    };

    expect(checkHttpStatus.bind(null, result)).to.throw('Not found!');
  });

  it('should throw "Internal server error!" error', () => {
    const result = {
      response: {
        statusCode: 500,
      },
    };

    expect(checkHttpStatus.bind(null, result)).to.throw('Internal server error!');
  });

  it('should return unchanged argument', () => {
    const result = {
      response: {
        statusCode: 200,
      },
    };

    const value = checkHttpStatus(result);

    expect(value).to.deep.equal(result);
  });

});

Add new test case to check http status
Add new test case to check http status
