Commit Graph

12 Commits (d5e30c26fea758e4752727f5ffddefa846fef583)

Author SHA1 Message Date
Jordan Orelli d5e30c26fe re-implementing the env system
the env system code is unecessarily fiddly. The current env system is
the second env system, so the layer system will be the third
implementation of the env system.

the environment in which we run our tests is a layered environment like
the scope in a programming language, but unlike with nested closures,
tea permits the user to supply match tags to skip what would be stack
frames in a system based on nested closures. It's more easily understood
as being a system of layers, and that we skip non-matching layers.

the env system also had the problem that it was a tree that was
dynamically constructed as a side-effect of the execution tree, but each
chain only needs to read its own ancestry in the environment tree.
Having a single tree poses challenges for parellelizing the execution of
different test chains, so instead, I would rather keep a list of layers
for each chain, instead of keeping a single environment tree that is
shared across all chains in the run. Additionally, the env system was
sparse; tests that save no data put no nodes in the env tree. I would
like to be able to display to users the layers available to their test
in certain error cases so that they can understand why a match may have
failed. Right now, in practice, encountering a match failure in a test
plan is confusing to understand.
4 years ago
Jordan Orelli acb92cc4d6 i dunno if this is a good idea. 4 years ago
Jordan Orelli a3346f59cc export a Passing type
I keep writing these one-off when I actually use tea. It seems like it's
worth including. It's especially useful for the root test, where you
don't necessarily want to create a test, but want to create a starting
environment. Exporting a type that always passes is preferrable to
making an explicit environment type, since we can maintain our
guarantees that our environment isn't an invalid value.
4 years ago
Jordan Orelli 31687f1014 update example 4 years ago
Jordan Orelli 6f26a9018c documentation 4 years ago
Jordan Orelli 765d13bb19 hm load failures aren't handled 4 years ago
Jordan Orelli 814dbea1bb field matching 4 years ago
Jordan Orelli e1fc2529e9 we gettin crazy now 4 years ago
Jordan Orelli 96d2a13aa7 use test name 4 years ago
Jordan Orelli 429d5bd735 after should use what was exec'd 4 years ago
Jordan Orelli 55f1d5e315 define the After interface 4 years ago
Jordan Orelli 56a16d36db flip all the files around 4 years ago