tp / tsaga

Typesafe and lightweight way to write Redux-connected functions with asynchronous side-effects that are easily testable.
Apache License 2.0
8 stars 1 forks source link

Don't implicitly rely on `jest`'s `expect` #52

Closed tp closed 5 years ago

tp commented 5 years ago

Oh, missed that because we also use deepStrictEqual in the old test helper.

Hmm, let's see, does expect have a much better output? Otherwise I would suggest switching to deepStrictEqual. (If expect is better, maybe we can use the underlying library directly, and skip a full jest dependency.)

This seems really bad overall though, since the only reason why it's working is that we by accident also use jest as a test runner and that then provides the global expect.

I wonder how that even works, because we don't have jest in the tsconfig.json (unlike the AYSA apps, which do have that IIRC).

_Originally posted by @tp in https://github.com/tp/tsaga/pull/49/review_comment/create_

tp commented 5 years ago

Ideas: Either we explicitly rely on jest as a peerDependency, or we just use the underlying comparison functions and eschew a dependency on the rest of jest.

HenriBeck commented 5 years ago

I think we can use the expect library.

HenriBeck commented 5 years ago

Though I don’t know how expect behaves with ava for example.