Showing posts with label test. Show all posts
Showing posts with label test. Show all posts

Sunday, December 31, 2017

Real integration tests with React, Redux and Router



After being bitten a couple of times by bad refactoring and a broken app — even with all my tests green — I started to research about integration tests in React. Possibly also with Redux and React Router. To my absolute shock, I couldn’t find any good material out there.

Thursday, December 21, 2017

Test redux actions that calls an API



export function receivingItems() { return (dispatch, getState) => { axios.get('/api/items') .then(function(response) { dispatch(receivedItems(response.data)); }); }; } describe('Items Action Creator', () => { it('should create a receiving items function', () => { expect(receivingItems()).to.be.a.

bundlephobia

JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...