fix: begin writing Lists integration tests. fix: list item response model's id value should be of type string so modified the created with id response model that it extends so that the id property is generically typed and type can be passed in.

This commit is contained in:
Stevan Freeborn
2023-02-17 14:27:33 -06:00
parent 369540d3c8
commit bc8b9a4977
10 changed files with 148 additions and 32 deletions
+1 -1
View File
@@ -780,7 +780,7 @@ describe('ApiResponse', function () {
const createdWithIdResponse = apiResponse.asCreatedWithIdResponseType();
expect(createdWithIdResponse).to.be.instanceOf(
ApiResponse<CreatedWithIdResponse>
ApiResponse<CreatedWithIdResponse<any>>
);
expect(createdWithIdResponse.data).to.be.instanceOf(
CreatedWithIdResponse
+1 -1
View File
@@ -12,7 +12,7 @@ describe('ListItemResponse', function () {
});
it('should have a constructor that takes an id and sets the id property', function () {
const id = 1;
const id = '3fa85f64-5717-4562-b3fc-2c963f66afa6';
const listItemResponse = new ListItemResponse(id);
expect(listItemResponse).to.have.property('id', id);
});