redux-saga-test
Advanced tools
Comparing version 0.0.2 to 0.0.3
20
index.js
'use strict' | ||
const saga = require('redux-saga') | ||
const effects = require('redux-saga/effects') | ||
var saga = require('redux-saga') | ||
var effects = require('redux-saga/effects') | ||
module.exports = function fromGenerator (t, generator) { | ||
const _next = function () { | ||
const args = Array.prototype.slice.call(arguments) | ||
var _next = function () { | ||
var args = Array.prototype.slice.call(arguments) | ||
return generator.next.apply(generator, args) | ||
} | ||
const _throw = function () { | ||
const args = Array.prototype.slice.call(arguments) | ||
var _throw = function () { | ||
var args = Array.prototype.slice.call(arguments) | ||
return generator.throw.apply(generator, args) | ||
} | ||
const _nextIs = function (fn, mock, effect) { | ||
var _nextIs = function (fn, mock, effect) { | ||
return function () { | ||
const args = Array.prototype.slice.call(arguments) | ||
var args = Array.prototype.slice.call(arguments) | ||
return t.deepEqual(fn(mock).value, effect.apply(null, args)) | ||
@@ -45,7 +45,7 @@ } | ||
takeEvery: function () { | ||
const args = Array.prototype.slice.call(arguments) | ||
var args = Array.prototype.slice.call(arguments) | ||
return t.deepEqual(_next().value, saga.takeEvery.apply(null, args).next().value) | ||
}, | ||
takeLatest: function () { | ||
const args = Array.prototype.slice.call(arguments) | ||
var args = Array.prototype.slice.call(arguments) | ||
return t.deepEqual(_next().value, saga.takeLatest.apply(null, args).next().value) | ||
@@ -52,0 +52,0 @@ } |
{ | ||
"name": "redux-saga-test", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "My finest module", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
5283