pixiv.moe
Version:
A pinterest-style layout site, shows illusts on [pixiv.net](http://pixiv.net) order by popularity. Written with React.
31 lines (27 loc) • 688 B
text/typescript
import honoka from 'honoka';
import mockStore from '../helpers/mockStoreHelper';
import config from '@/config';
import * as GalleryActions from '@/actions/gallery';
describe('GalleryActions', () => {
beforeEach(() => {
honoka.defaults.baseURL = config.apiBaseURL;
});
it('fire SET_FETCH_ERROR when fetching sources has been done', done => {
const expectedActions = [
{
type: GalleryActions.types.SET_FETCH_ERROR,
payload: {
isError: false
}
}
];
const store = mockStore(
{
gallery: {}
},
expectedActions,
done
);
store.dispatch(GalleryActions.fetchSourceIfNeeded());
});
});