Expand description
VAPP-196 (eApps T1): PACKAGE TESTS, the twin of
packages/exponential-ui/src/host/tests.ts. A package carries tests: [{name, records?, now?, as?, expr | query | action, expect}];
validate_package runs every one on an
otherwise valid package, each against its OWN in-memory store seeded with
records, on a fixed clock (now, UTC) as the member as. A failing
test is an install issue at /tests/<i> (expected vs got). Locked by
fixtures/package-tests.json.
Structs§
- Package
Test Result - One test’s outcome (
runPackageTests).
Constants§
- PACKAGE_
TEST_ DEFAULT_ AS - The member a test runs as when it names none.
- PACKAGE_
TEST_ DEFAULT_ NOW - The clock a test runs at when it names none.
- PACKAGE_
TEST_ DEFAULT_ ROLE - eApps R3: the team role a test runs as when it names none, and the roles it may name.
- PACKAGE_
TEST_ KINDS - What a test runs: exactly one of these keys.
- PACKAGE_
TEST_ LIMIT_ GOT_ MAX - The characters (code points) of a
gotan issue prints. - PACKAGE_
TEST_ LIMIT_ TESTS - Caps: tests per package.
- PACKAGE_
TEST_ ROLES
Functions§
- package_
test_ issues - The failing tests as install issues (
/tests/<i>). - run_
package_ tests - Every test of a package, run (a package whose tests are malformed runs none).
- test_
failure - The issue text of a failed test: expected vs got, both canonical JSON
(got cut at
PACKAGE_TEST_LIMIT_GOT_MAXcode points +…). - test_
matches - Does
gotsatisfyexpect? An object matches by the keys it names (recursively; a missing key reads null), a list item by item with the same length, anything else by JSON equality (1equals1.0). - validate_
package_ tests - The shape issues of a package’s
tests(they run only without any).