Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into UIU-1990
Browse files Browse the repository at this point in the history
mkuklis authored May 31, 2022
2 parents 6fdf555 + 4685816 commit 0fde5e7
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -204,6 +204,7 @@
* Create Jest/RTL test for `Limits`. Refs UIU-2399.
* Create Jest/RTL test for `UserRequests`. Refs UIU-2306.
* Create Jest/RTL test for `HelperApp`. Refs UIU-2310.
* Create Jest/RTL test for `constants`. Refs UIU-2316.

## [6.1.0](https://github.com/folio-org/ui-users/tree/v6.1.0) (2021-06-18)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v6.0.0...v6.1.0)
48 changes: 48 additions & 0 deletions src/constants.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { refundClaimReturned,
requestStatuses,
itemStatuses,
loanStatuses,
accountStatuses,
loanActions,
loanActionMutators,
deliveryFulfillmentValues,
sortTypes,
statusFilter } from './constants';

/* Change the length of the imported constants in test files if constant files are changed */

describe('Constants', () => {
test('refundClaimReturned', () => {
expect(Object.keys(refundClaimReturned).length).toEqual(11);
});
test('requestStatuses', () => {
expect(Object.keys(requestStatuses).length).toEqual(8);
});
test('itemStatuses', () => {
expect(Object.keys(itemStatuses).length).toEqual(4);
});
test('loanStatuses', () => {
expect(Object.keys(loanStatuses).length).toEqual(1);
});
test('accountStatuses', () => {
expect(Object.keys(accountStatuses).length).toEqual(2);
});
test('loanActions', () => {
expect(Object.keys(loanActions).length).toEqual(4);
});
test('loanActionMutators', () => {
expect(Object.keys(loanActionMutators).length).toEqual(3);
});
test('deliveryFulfillmentValues', () => {
expect(Object.keys(deliveryFulfillmentValues).length).toEqual(2);
});
test('sortTypes', () => {
expect(Object.keys(sortTypes).length).toEqual(2);
});
test('statusFilter', () => {
expect(Object.keys(statusFilter).length).toEqual(2);
});
test('loanActions', () => {
expect(Object.keys(loanActions).length).toEqual(4);
});
});

0 comments on commit 0fde5e7

Please sign in to comment.