Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. // actions.spec.js
  2. import { call } from 'vuex-saga'
  3. import api from '../api'
  4. import { fetchFlow } from '../actions';
  5. import assert from 'assert';
  6.  
  7. describe('fetchFlow()', function () {
  8.  
  9. it('Should Run The Flow Correctly ', function () {
  10. let process = fetchFlow()
  11.  
  12. let fakeRespon = {}
  13.  
  14. // Fetch Product Step
  15. assert.deepEqual(process.next().value, call(api.fetchProduct))
  16.  
  17. // Fetch Seller Step
  18. assert.deepEqual(process.next(fakeRespon).value, call(api.fetchSeller, { fakeRespon }))
  19. });
  20.  
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement