16 lines
447 B
JavaScript
16 lines
447 B
JavaScript
|
import { getLoadingStatus, setLoadingStatus } from '../api';
|
||
|
|
||
|
describe('#getLoadingStatus', () => {
|
||
|
it('returns correct status', () => {
|
||
|
expect(getLoadingStatus({ fetchAPIloadingStatus: true })).toBe(true);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
describe('#setLoadingStatus', () => {
|
||
|
it('set correct status', () => {
|
||
|
const state = { fetchAPIloadingStatus: true };
|
||
|
setLoadingStatus(state, false);
|
||
|
expect(state.fetchAPIloadingStatus).toBe(false);
|
||
|
});
|
||
|
});
|