Skip to content

Instantly share code, notes, and snippets.

@carlosble
Created April 5, 2017 18:43
Show Gist options
  • Save carlosble/a65ac937958b113414f984a478500ba6 to your computer and use it in GitHub Desktop.
Save carlosble/a65ac937958b113414f984a478500ba6 to your computer and use it in GitHub Desktop.
Finer test, checking the store
it("populates the store with server data", (done) => {
const invoice = {
reference: '0001',
amount: '10.00',
};
store.subscribe(() => {
expect(store.getState().billing.invoices[0]).toEqual(invoice);
done();
});
stubApi.getInvoices = () =>{
return Promise.resolve([invoice]);
};
createPage();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment