From d00683ea3c235b293126a572189c78a56f76c987 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn Date: Thu, 2 Feb 2023 16:14:05 -0600 Subject: [PATCH] feat: begin writing tests for getAppsByIds method --- src/models/OnspringClient.ts | 3 +++ tests/OnspringClient.spec.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/models/OnspringClient.ts b/src/models/OnspringClient.ts index 232f5d9..46b41e4 100644 --- a/src/models/OnspringClient.ts +++ b/src/models/OnspringClient.ts @@ -12,6 +12,9 @@ import { App } from './App'; * @class OnspringClient - A client that can communicate with the Onspring API. */ export class OnspringClient { + getAppsByIds(getAppsByIds: any) { + throw new Error('Method not implemented.'); + } /** * @readonly {AxiosInstance} client - The axios instance that will be used to make requests to the Onspring API. */ diff --git a/tests/OnspringClient.spec.ts b/tests/OnspringClient.spec.ts index 6c5142c..b489081 100644 --- a/tests/OnspringClient.spec.ts +++ b/tests/OnspringClient.spec.ts @@ -506,4 +506,31 @@ describe('OnspringClient', function () { expect(result.data).to.be.null; }); }); + + describe('getAppsByIds', function () { + it('should be defined', function () { + expect(new OnspringClient(baseUrl, apiKey).getAppsByIds).to.not.be + .undefined; + }); + + it('should be a function', function () { + expect(new OnspringClient(baseUrl, apiKey).getAppsByIds).to.be.a( + 'function' + ); + }); + + it('should have 1 parameter', function () { + expect(new OnspringClient(baseUrl, apiKey).getAppsByIds).to.have.lengthOf( + 1 + ); + }); + + it('should return a promise', function () { + expect( + new OnspringClient(baseUrl, apiKey).getAppsByIds([1, 2, 3]) + ).to.be.a('promise'); + }); + + // TODO: complete wriiting tests for getAppsByIds method + }); });