Add in expect assertion cases #25

Merged
merged 3 commits into from Dec 15, 2016

Projects

None yet

2 participants

@browniefed
Contributor
browniefed commented Dec 15, 2016 edited

#13

@browniefed
Contributor

Had to skip over from the previous memberExpression structure since it didn't match how all the other conditions were done.

@skovhus

Thanks. Looks good!

src/transformers/ava.js
@@ -17,6 +17,7 @@ import proxyquireTransformer from '../utils/proxyquire';
const SPECIAL_THROWS_CASE = '(special throws case)';
const SPECIAL_BOOL = '(special bool case)';
+const SPECIAL_ASSERTION_CASE = '(special assertion case)';
@skovhus
skovhus Dec 15, 2016 edited Owner

Small thing: but as everything is "assertions" can we call it SPECIAL_PLAN_CASE. That might be a bit more descriptive.

@skovhus
Owner
skovhus commented Dec 15, 2016 edited

In tape you usually have a lot of pointless t.plan (if you are not using t.end)... You need that in order for the code to work. Ava is different in that case.

So one question might be if we should leave t.plan for tape if there is no async looking code, e.g. function calls.

Any thoughts?

@browniefed
Contributor

Updated.
I would generally attempt to make less assumptions. In our case it won't matter, expect.assertions doesn't depend on things being async to work.

@skovhus skovhus merged commit cc47c14 into skovhus:master Dec 15, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment