Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // actions.spec.js
- import { call } from 'vuex-saga'
- import api from '../api'
- import { fetchFlow } from '../actions';
- import assert from 'assert';
- describe('fetchFlow()', function () {
- it('Should Run The Flow Correctly ', function () {
- let process = fetchFlow()
- let fakeRespon = {}
- // Fetch Product Step
- assert.deepEqual(process.next().value, call(api.fetchProduct))
- // Fetch Seller Step
- assert.deepEqual(process.next(fakeRespon).value, call(api.fetchSeller, { fakeRespon }))
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement