fix: test formatting

This commit is contained in:
StevanFreeborn
2023-02-01 23:45:14 -06:00
parent f7229b5344
commit e6cde7fbe7
27 changed files with 156 additions and 82 deletions
+27 -6
View File
@@ -15,14 +15,35 @@ describe('PagedResponse', function () {
});
it('should construct a new instance of PagedResponse', function () {
const pagedResponse = new PagedResponse<number>([1, 2, 3, 4], 1, 10, 100, 100);
const pagedResponse = new PagedResponse<number>(
[1, 2, 3, 4],
1,
10,
100,
100
);
expect(pagedResponse).to.not.be.undefined;
expect(pagedResponse).to.be.instanceOf(PagedResponse);
expect(pagedResponse).to.have.property('items').to.be.an('array').to.have.lengthOf(4);
expect(pagedResponse).to.have.property('pageNumber').to.be.a('number').to.equal(1);
expect(pagedResponse).to.have.property('pageSize').to.be.a('number').to.equal(10);
expect(pagedResponse).to.have.property('totalPages').to.be.a('number').to.equal(100);
expect(pagedResponse).to.have.property('totalRecords').to.be.a('number').to.equal(100);
expect(pagedResponse)
.to.have.property('items')
.to.be.an('array')
.to.have.lengthOf(4);
expect(pagedResponse)
.to.have.property('pageNumber')
.to.be.a('number')
.to.equal(1);
expect(pagedResponse)
.to.have.property('pageSize')
.to.be.a('number')
.to.equal(10);
expect(pagedResponse)
.to.have.property('totalPages')
.to.be.a('number')
.to.equal(100);
expect(pagedResponse)
.to.have.property('totalRecords')
.to.be.a('number')
.to.equal(100);
});
});