harvest
Version:
Harvest API client library
25 lines • 752 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const company_1 = require("./company");
const harvest = {
request: () => {
console.log('Request Made');
}
};
describe('Company test', () => {
let instance;
let request;
let id = 1000;
beforeEach(() => {
instance = new company_1.CompanyAPI(harvest);
request = spyOn(instance.harvest, 'request');
});
it('Company is instantiable', () => {
expect(instance).toBeInstanceOf(company_1.CompanyAPI);
});
it('should have a get method that calls the request method', () => {
instance.get();
expect(request).toBeCalledWith('GET', '/v2/company');
});
});
//# sourceMappingURL=company.spec.js.map