Skip to content
Permalink
Browse files

test: fix arguments (#52)

This cleans up some test invocations, omitting unused arguments.
  • Loading branch information...
noelyoo authored and ghengeveld committed Jun 1, 2019
1 parent 4255897 commit e02ee4c77d9758058edd99a4d515efbc22a68dd8
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/Async.spec.js
  2. +4 −4 src/useAsync.spec.js
@@ -23,12 +23,12 @@ beforeEach(abortCtrl.abort.mockClear)
afterEach(cleanup)

describe("Async", () => {
describe("common", common(Async, abortCtrl))
describe("with `promise`", withPromise(Async, abortCtrl))
describe("common", common(Async))
describe("with `promise`", withPromise(Async))
describe("with `promiseFn`", withPromiseFn(Async, abortCtrl))
describe("with `deferFn`", withDeferFn(Async, abortCtrl))
describe("with `reducer`", withReducer(Async, abortCtrl))
describe("with `dispatcher`", withDispatcher(Async, abortCtrl))
describe("with `reducer`", withReducer(Async))
describe("with `dispatcher`", withDispatcher(Async))

test("an unrelated change in props does not update the Context", async () => {
let one
@@ -31,12 +31,12 @@ const Fetch = ({ children = () => null, input, init, options }) =>
children(useFetch(input, init, options))

describe("useAsync", () => {
describe("common", common(Async, abortCtrl))
describe("with `promise`", withPromise(Async, abortCtrl))
describe("common", common(Async))
describe("with `promise`", withPromise(Async))
describe("with `promiseFn`", withPromiseFn(Async, abortCtrl))
describe("with `deferFn`", withDeferFn(Async, abortCtrl))
describe("with `reducer`", withReducer(Async, abortCtrl))
describe("with `dispatcher`", withDispatcher(Async, abortCtrl))
describe("with `reducer`", withReducer(Async))
describe("with `dispatcher`", withDispatcher(Async))

test("accepts [promiseFn, options] shorthand, with the former taking precedence", async () => {
const promiseFn1 = () => resolveTo("done")

0 comments on commit e02ee4c

Please sign in to comment.
You can’t perform that action at this time.