You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Non-constant variables (variables that are reassigned after declaration, not referring to const here):
vartest;test=require('ava');
It seems possible to support 1 and 2 without a lot of pain. 3 quickly becomes impossible. I think #695 provides a solution that would allow us to cover most use cases for dynamically generating tests and still give us the ability to do the static analysis we need to. 4 just seems silly and probably not very likely in practice.
Blocks #78.
We need a way to do static analysis of test files, specifically to discover if any use exclusive tests (i.e.
test.only).There are plenty of complications:
Naming the AVA import something other than test:
Storing a reference to a
test.onlyfor reuse:Similar can also be achieved with import statements:
Or require statements:
Dynamically generating tests (see [Idea]: test macros #695 possible solution).
Non-constant variables (variables that are reassigned after declaration, not referring to
consthere):It seems possible to support
1and2without a lot of pain.3quickly becomes impossible. I think #695 provides a solution that would allow us to cover most use cases for dynamically generating tests and still give us the ability to do the static analysis we need to.4just seems silly and probably not very likely in practice.