fix: enabled strict null checks and made changes to deal with this compiler change. fix: modified endpoint factory methods to not need baseURL to be passed in. instead just return endpoint because the axios client with already have a default url set as part of constructing a new onspring client instance

This commit is contained in:
StevanFreeborn
2023-02-02 13:53:02 -06:00
parent 88bf080847
commit d453f19c97
8 changed files with 137 additions and 178 deletions
+7 -4
View File
@@ -269,10 +269,13 @@ describe('OnspringClient', function () {
expect(result.data).to.have.property('totalPages', 1);
expect(result.data).to.have.property('totalRecords', 2);
expect(result.data).to.have.property('items');
expect(result.data.items).to.be.instanceOf(Array);
expect(result.data.items).to.have.lengthOf(2);
expect(result.data.items[0]).to.be.instanceOf(App);
expect(result.data.items[1]).to.be.instanceOf(App);
expect(result.data).to.not.be.null;
if (result.data != null) {
expect(result.data.items).to.be.instanceOf(Array);
expect(result.data.items).to.have.lengthOf(2);
expect(result.data.items[0]).to.be.instanceOf(App);
expect(result.data.items[1]).to.be.instanceOf(App);
}
});
it('should return a promise that resolves to an api response when request returns a 400 status code', async function () {