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:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user